[Xotcl] incorrect example for non positional arguments

Gustaf Neumann neumann at wu-wien.ac.at
Tue Mar 8 10:30:48 CET 2005

John McGlaughlin schrieb:

>The following examples in tutorial cause errors 
>Object o
> o proc y {-a {-b {1 2 3}} x y} {
>     puts "$a $b $x $y"
> }

Dear John,

this example is correct for xotcl 1.3.5, which the tutorial
tries to document (see Changelog). xotcl 1.3.5 accepts the
"old" syntax with separate argument lists (as in your
"corrected" version) and the new syntax with a single
argument list, which i added for 1.3.5 to make non positional
arguments more similar to what's used in openacs. Btw,
xotcl's non-pos arguments implementation is by a
factor of 6 faster than the tcl implementation in oacs (i.e.
reducing the invocation overhead by this factor).

>ALSO notice that one example is incorrect for -b passing a string 4 5 needs to be bound {4 5}
This was certainly incorrect in the tutorial. i have fixed
this locally, and it will be fixed on the server in a few minutes.

Thanks a lot

-gustaf neumann

PS: we are planning the release of 1.3.6 with a few bug fixes this week 
or early
next week ... with windows binaries.

More information about the Xotcl mailing list