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

The results are as expected when compiled to an .exe and run from the command line -- the GUI argument editor comes up, and it nicely reverses the command line arguments entered.

But if I replace getGuiArgs with either GetArgs or GetCmdArgs and try to use command-line arguments, I get an error message like this when I try to run it:

%******************** Error: conditional failed *****************
%**
%** Missing else clause
%**
%** Matching: 111
%** in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/List.oz", line 70
%**
%** Call Stack:
%** procedure 'DoReverse' in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/List.oz", line 67, column 3, PC = 10673104
%** procedure 'ForProc' in file "c:/Documents and Settings/Chris/My Documents/ohce.oz", line 6, column 3, PC = 10671960
%** procedure in file "c:/Documents and Settings/Chris/My Documents/ohce.oz", line 1, column 0, PC = 10672260
%** procedure 'RootManager,Pickle/fast' in file "d:/cygwin/home/bruni/Projects/Mozart/Sources/share/lib/init/Module.oz", line 244, column 6, PC = 10648024
%** procedure in file "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/Base.oz", line 92, column 7, PC = 10706940
%**--------------------------------------------------------------

Am I doing something wrong here?
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to