Personal tools

Cookbook/Interactivity

From HaskellWiki

< Cookbook(Difference between revisions)
Jump to: navigation, search
(Printing a string)
Line 12: Line 12:
 
</haskell>
 
</haskell>
 
|-
 
|-
| printing a string in a new line
+
| printing a string with a newline character
 
| [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3AputStrLn putStrLn]
 
| [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3AputStrLn putStrLn]
 
|<haskell>
 
|<haskell>

Revision as of 09:07, 2 August 2009

Problem Solution Examples
printing a string putStr
Prelude> putStr "Foo"
FooPrelude>
printing a string with a newline character putStrLn
Prelude> putStrLn "Foo"
Foo
reading a string getLine
Prelude> getLine
Foo bar baz          --> "Foo bar baz"


Parsing command line arguments

TODO