Hi all,
Taking into account the last advice about parsing
command lines arguments, i wrote the next functor:
functor
import Browser Application Open Property
define
Args=record('in'(single type:string)
out(single type:string)
times(single type:int))
class TextFile from Open.file Open.text end
Spec
proc{Parse F} T in
T={F getS($)}
if T==false then
skip
else
{Property.put 'ozd.args' T}
{Parse F}
end
end
File
Spec
in
File={New TextFile init(name:"foo" flags:[read])}
{Parse File}
Spec= {Application.getCmdArgs Args}
{Browser.browse Spec.'in'}
end
When the Parse procedure is called, it starts to add
the arguments values.
My doubt is as next:
When i call the Property.put procedure, the actual
file line is placed into ozd.args, but when i try to
do the last browse, only the last value appears and
their type is string.
String is the right type, or should be casted ?
Thanks.
Albert
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.