Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Globals Declared in Subroutines Without it Being Called [7.4]

Author
Message
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 10th Aug 2010 23:56 Edited at: 10th Aug 2010 23:57
This may appear in 7.5 but I haven't tested yet, nor could I find a thread with a similar bug.

In this example, the subroutine 'declareVariables' isn't called, but variable A and B still become global:



Any ideas?

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Aug 2010 01:20
It's just the way it's designed. You can't actually create a global variable during the execution of the program since the compiler wouldn't know how to reference it. So, all globals exist from the start.
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 11th Aug 2010 01:37
Yeah, that would actually make sense, didn't really look at it that way when I was playing about with them. Cheers Benjamin

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.

Login to post a reply

Server time is: 2024-04-26 18:12:17
Your offset time is: 2024-04-26 18:12:17