ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | >> System << | Time | Locale | CPUTime | Random |
Module: | System |
---|---|
Function: | getArgs |
Type: | IO [String] |
Description: | Computation getArgs returns a list of the program's command line arguments (not including the program name). |
Related: | getProgName |
Program source: import System main = do x <- getArgs print x
Input: 1 3.3 AAA
Output: ["1","3.3","AAA"]
Program source: import System main = do x <- getArgs print (sum (map rDouble x)) rDouble :: String -> Double rDouble = read
Input: 3.4 2 2.5
Output: 7.9