|
Posted by Maarten on 11/18/05 19:35
What can I say? You are right of course. Thanks you very much for your help.
Regards, Maarten
"Oli Filth" <catch@olifilth.co.uk> wrote in message
news:Lboff.12273$fN5.8401@newsfe6-gui.ntli.net...
> Maarten said the following on 18/11/2005 17:28:
>> Yes, that's it! So, a variable declared inside a function isn't available
>> inside nested function even while you are calling it in (global). You'll
>> have to declare it global in the main function first. This can cause
>> problems though, as there might be a variable with the same name outside
>> the main function that you do not want to access. See what I mean? The
>> solution is obvious of course, but sometimes you just don't know what
>> variables live out there, do you?
>>
>
> I think the solution is: Don't use global variables!
>
> Always explicitly pass required variables to functions.
>
> --
> Oli
[Back to original message]
|