Probably for a similar reason this C code doesn't work:
#include <stdlib.h>
void Test()
{
printf("Var: %d\n", X);
}
int main()
{
for(int X = 0;X < 10;X)
Test();
return 0;
}
In Rebol, setting a word to some value is a global action unless it's done
within an object. (I may be wrong here, but that's how it seems to work, and
how I understand it) So setting line to something else before calling your
function is equivalent in the above C code to adding a global variable and
using that instead of trying to access X where it doesn't exist.
On Mon, 2007-12-10 at 20:46 +0100, Giuseppe Chillemi wrote:
>
>
> > > The script returns LINE has no Value, I must assign it to a
> > temporary
> > > variable... why ?
> > try changing get_data to a func and pass 'line as an
> > argument to it tim
>
> Yes, it is another solution but my question is WHY is this happening ?
>
> Giuseppe Chillemi
>
>
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.