Re: Forward reference to included function
- Posted by evanmars Jan 16, 2014
- 1518 views
mattlewis said...
_tom said...
This I don't understand:
It suggests to me that this should work:
foo() procedure foo() ? x end procedure atom x = 1 -- variable x has not been assigned a value
You got an error, but not because of scope. The error was due to execution order and the variable not being assigned before it was used.
Matt
If I may comment as someone that isn't that great of a programmer and relies heavily on the documentation to understand how Euphoria is supposed to work.
I think the point is is that the variable is definitely in scope; it can be written to, but it cannot be read from until it has first been written to.
Is this correct?