[clean-list] Passing commandline arguments to a clean program

Arjen van Weelden A.vanWeelden@cs.ru.nl
Tue, 07 Sep 2004 14:07:20 +0200


Hello Sander,

There is an example, called printenv.icl, included in the 
ArgEnv{Windows/Unix} library, which is part of the Clean distribution. 
It can also be downloaded separately from the Clean website.
Here is another small example:

import StdEnv, ArgEnv

Start
	| argc == 1 = makeFreqList (openfile argv.[1])
	= undef
where
	argc = size argv - 1
	argv = getCommandLine

regards,
	Arjen

Sander van den Berg wrote:
> Hello list,
> 
> Is it possible to pass commandline arguments to a Clean program.
> 
> For example:
> freqList filename.txt
> 
> and in freqList:
> 
> Start :: *world -> *world
> Start = makeFreqList (openfile command_line_argument)
> 
> (Just an example, not working or anything)
> 
> Regards,
> 
> Sander
> 
> 
> _______________________________________________
> clean-list mailing list
> clean-list@cs.kun.nl
> http://www.cs.kun.nl/mailman/listinfo/clean-list