Raphael Collet writes:
> Christopher Dicely wrote:
> > I'm a complete newbie trying to get a handle on Mozart/Oz (running on
> > Windows XP Home, if that matters), so I've been trying some basic little
> > programs to get a feel of it; one I tried to do was a fairly common kind
> > of thing -- writing a program that outputs its command line arguments,
> > reversed (both in reverse order of the arguments, and reversing the
> > letters of each argument). If I do this:
> >
> > functor
> > import
> > Application
> > System
> > define
> > for X in {List.reverse {Record.toList {Application.getGuiArgs
> > plain}}.1} do
> > {System.printInfo {List.reverse X}#" "}
> > end
> > {Application.exit 0}
> > end
>
> Your program is wrong! It should not work at all, in fact. If you
> check the documentation, you will see that {Application.getGuiArgs
> plain} returns a *list* of strings, while Record.toList converts a
> *record* to a *list*. Your program seems to work fine because Oz' lists
> are records.
>
Actually, if you try to run with getGuiArgs you see that it does
return a record i.e.,
optRec([[52 32 53 32 54]])
This seems to be buggy documentation and/or implementation.
cheers
k
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users