Thanks all,
I got it working finally. What did i learn ?
a) I need to put a do after else for more than one instruction (?)
b) All similar type of questions are to be redirected to haskell-beginner
and haskell-cafe
Points noted.
Thank you once again,
Abdullah Abdul Khadir
On Wed
On 26 nov 2008, at 17:18, abdullah abdul Khadir wrote:
Hi,
The function getMyLine written by me is intended for getting a
complete string from the standard input.
import IO
getMyLine :: IO [Char]
getMyLine = do
c <- getChar
if(c == '\n')
Hi Abdullah,
On Wed, 2008-11-26 at 21:48 +0530, abdullah abdul Khadir wrote:
> Hi,
>
> The function getMyLine written by me is intended for getting a
> complete string from the standard input.
>
> import IO
>
> getMyLine :: IO [Char]
> getMyLine = do
> c <- getChar
>
Hi,
The function getMyLine written by me is intended for getting a complete
string from the standard input.
import IO
getMyLine :: IO [Char]
getMyLine = do
c <- getChar
if(c == '\n')
then return ""
elsecs <-