On Wed, 2005-07-13 at 11:40 -0400, Freejack wrote:
> Alright...I just slapped together a little echo script to help me get a
> feel for text handling in Oz. Here it is my ozecho script...
> Args = {Application.getArgs record('in'(single type:string))}
> %% 'out'(single type:string))}
> The compiler doesn't give me any problems with this. However, when
> running it with an argument, it pukes. ozecho --foo gives me this error...
>
> %***************** Error: application programming ***************
> %**
> %** unknown option `foo'
> %**
> %**
> %** Call Stack:
> %** procedure 'GetLongOptSpec' in file "./ap/Application.oz", line 474,
> column 2, PC = 136070008
> %** procedure 'ParseLongOpt' in file "./ap/Application.oz", line 497, column
> 2, PC = 136070204
> %** procedure 'ParseOptions' in file "./ap/Application.oz", line 517, column
> 2, PC = 136070952
> %** procedure 'ProcessArgv' in file "./ap/Application.oz", line 747, column
> 3, PC = 136034076
> %** procedure in file "./ozecho.oz", line 1, column 0, PC = 135799404
> %** procedure 'RootManager,Pickle/fast' in file "./init/Module.oz", line 244,
> column 6, PC = 135764704
> %** procedure in file
> "/home/kost/compile/build-1.3.0/updates/mozart/share/lib/base/Base.oz", line
> 92, column 7, PC = 135883484
> %
>
> The command "ozecho foo" doesnt do anything.
I'm quite new to Oz too, but I can hazard a guess why "ozecho --foo"
gives an error and "ozecho foo" doesn't.
My guess would be that you haven't defined "foo" in the Spec that you
pass to Application.getArgs. This is an error, so Application.getArgs
throws the exception that you see as "unknown option 'foo'". See "Error
Handling" in http://www.mozart-oz.org/documentation/system/node2.html
for more info.
Rich
--
Rich Dougherty
http://www.rd.gen.nz/
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users