[REBOL] Re: Undocumented: Index value local to FOR loop

2004-03-24 Thread Gregg Irwin
Ladislav and Volker, Good thing you guys were here to catch me! I had a definite "huh?" moment when I saw Volker's message, then saw that I had a completely different train of thought when I read the original message. My brain said that the error was from global use of indice after the loop was d

[REBOL] Re: Undocumented: Index value local to FOR loop

2004-03-23 Thread Ladislav Mecir
Gregg Irwin napsal(a): >...REBOL uses >'definitional scoping', which may seem a bit confusing at first when >used with literal arguments. > > > >>>fn: func ['word] [print word word: 10 print word] >>>fn hello >>> >>> >hello >10 > > >>>hello >>> >>> >** Script Error: hello has no

[REBOL] Re: Undocumented: Index value local to FOR loop

2004-03-23 Thread Volker Nitsch
Hi Giuseppe, On Dienstag, 23. März 2004 15:50, Giuseppe Chillemi wrote: > I have found this undocumentend behaviour: > Try this script: rebol [] esterno: does [ print [indice] ] for indice 1 10 1 [ esterno ] Halt > Rebol tell me that "indice" is not initalized bu

[REBOL] Re: Undocumented: Index value local to FOR loop

2004-03-23 Thread Gregg Irwin
Hi Giuseppe, GC> I have found this undocumentend behaviour: GC> for indice 1 10 1 [esterno] GC> Rebol tell me that "indice" is not initalized but it is ! This word seems to GC> remain local to the for loop. Yes, FOREACH and REPEAT work the same way. FOR is a mezzanine, so you can see how it wo