
16 Jul
2005
16 Jul
'05
11:19 a.m.
Hello all, first I have to apologise for my English. So, I don't fully understand haskells IO, but I need some testing 'main' function: ./bundle01 <cmd> <arg1> <arg2> ... I more apoarches, but no one worked. Now I tried this: m01_mod :: Int -> Int -> Int b01_mod a b = a mod b main = do (cmd:ss) <- getArgs putStrLn ( if (cmd == "mod") then do show (b01_mod (read (ss!!1)) (read (ss!!2))) else do "unknown command!") Please, send me somethung like this (I need to understand it). I need runing more <cmd>s and with various argument counts and types. All functions "in a bundle" should be in one file. Thanks to you all :) Matej 'Yin' Gagyi