Hi

Here is a program which shows the return value of a function:

module Main where
main = putStr (show (foo 3))
foo x = x + 2

Here is a little bigger program:

module Main where

main = do putStr (show (foo 3))
          putStr "\n"
          putStr (show (foo 7))
          putStr "\n"

foo x = x + 2

/Mads Lindstr�m

> Hi!
> In my program I would like to see an result of
> function or an variable.
> Wenn I use "show myfunction" or "show variable", I'm
> getting errors like "ERROR - Improperly terminated
> character constant" or " Syntax error in declaration
> (unexpected `;', possibly due to bad layout)"
> 
> Any help would be appreciated!
> 
> 
> 
>               
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
> 
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
-- 
Mads Lindstr�m <[EMAIL PROTECTED]>

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to