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.

DarkBASIC Professional Discussion / What's this new "Global" command?

Author
Message
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 17th Dec 2002 18:32
The "Global" command is not mentioned in the DBPro or DB manual or updated manuals?

I take it means that a variable after the command "global" means that the variable is use throughout the whole program?

Aren't the variables global to start with?

Is there anywhere to get a Word document version of the updated darkbasic command set?

What does this Global command do?
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 17th Dec 2002 20:27
Global makes variables global - I think its used inside functions to make variables global.

Good news everybody! I really am THAT good...
Kale
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: United Kingdom
Posted: 17th Dec 2002 20:48
in other languages the variables inside functions are always local to the function containing it. if a variable is declared to be global then the functions share that variable with the rest of the program.

What the flame does not consume, consumes the flame.
------------------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7, WinXP Home
ZomBfied
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 17th Dec 2002 21:01
It's used outside functions to make vars global. Fun for every function

ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 17th Dec 2002 21:39

Login to post a reply

Server time is: 2024-05-02 02:57:35
Your offset time is: 2024-05-02 02:57:35