Re: Forward reference to included function

new topic     » goto parent     » topic index » view thread      » older message » newer message
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?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu