Command-line arguments: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 92:
delta
$
 
==[[Haskell]]==
[[Category:Haskell]]
 
Defined the the System module, getArgs::IO [String] provides the command-line arguments in a list.
 
myprog.hs:
import System
main = getArgs >>= print
 
myprog a -h b c
=> ["a","-h","b","c"]
 
==[[Java]]==