Alan Oswald wrote:
However, I really would like to know how to do it at the command prompt. Partly this is because I'm trying to get to grips with functors and modules.

Arguments passed to the program can be retrieved with Application.getArgs (see documentation).

If you want to read the standard input of your process, you should open it as a file. Here is an example:

local
   class TextFile from Open.file Open.text end
   StdIn={New TextFile init(name:stdin)}

   %% read the first line from stdin (as a string)
   N={StdIn getS($)}
in
   {System.showInfo N#" bottles of beer chosen"}
end


Cheers,
raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to