[Xotcl] Non-pos arguments with args
Kurt Stoll
kstoll at echelon.com
Fri Feb 17 17:24:04 CET 2006
I am having difficulty getting non-positional arguments to behave correctly
with args. The simple example below shows what I have found. This does not
appear to be appropriate behavior. Am I doing something wrong?
Object obj
obj proc pr1 { {-npos default} args } {
puts "npos: $npos"
puts "args: $args"
}
> ## This works:
> obj pr1 a
npos: default
args: a
>
> ## As does this:
> obj pr1 -npos 3 a
npos: 3
args: a
>
> ## But this does not:
> obj pr1 -npos 3
npos: 3
args: -npos 3
>
> ## I expected args to be {}, but instead it contains the non-positional
parameter
Thanks for any insight you can provide.
-Kurt Stoll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060217/e7c15633/attachment.html
More information about the Xotcl
mailing list