Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
> Thanks for your quick reactions.
You are welcome.
> Indeed, doing
> $P0(q)
> works ok. I'm a bit confused by syntax then (but I think it makes sense
> now, if IMCC sees the "(", it is expecting args I guess)
Yep. Function and method calls as well as *returns* have their arguments
in parenthesis.
> In the mean time, I wrote another example for closures (maybe I should
> collect these in a HOWTO document :-)
Yes please.
> (This one *is* working, however, again I don't understand why some
> things have to be done in a particular way)
> newsub clos, .Closure, _function
> # why should I do this? (should I?) ".return clos" does not work
> (then it's whining about "SArray" again)
> P5 = clos
.return(clos)
> find_lex j, "i"
> j = j + 1
> print j
> store_lex -1, "j", j
The store_lex isn't really necessary, as you are modifying "j" in place-
> .return j
.return(j)
> Klaas-Jan
leo