parser error?

I cannot understand why the definition of foo2 fails when I try toload this file:t: ()foo1: {t:2;}foo2: {if[not t~();:()]; t:2;}The problem is with the assignment to t but I have no idea why sinceit works in foo1.

> foo1: {t:2;}> foo2: {if[not t~();:()]; t:2;}the rules for referring to globals from within functions are a bit trickythe easy answer is to do this:foo1: {t::2;}foo2: {if[not t~();:()]; t::2;}your foo1 assigns a local variable named t

Thanks. I had completely forgotten about :: as assignment.