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 Discussion / DBC Supports Global command?

Author
Message
Skeletor
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 9th Sep 2004 12:40
Is there a way to make a variable Global other than putting it into an array?


http://www.angelfire.com/games5/db_games/
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 9th Sep 2004 14:12
Get DarkEdit and use its extended syntax, which basically just takes GLOBAL myvar and turns it into myvar(0)=0 and replaces myvar anywhere else in your program with myvar(0). It's much easier, but is still the same effective method we've come to know and love (stupid frickin retarded arrays).

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 10th Sep 2004 02:07
CodeKeeper does too, and that basically uses:

YES, THIS CODE IS VALID INSIDE OF CODEKEEPER:

DECLARE myglobalstring~ As STRING
DECLARE myglobalnumber~ As INTEGER
DECLARE myglobaldeciamal~ As FLOAT

(NOTE: NO '$' AFTER THE STRING NAME!!!!)
(NOTE: ~ IS REQUIRED!!!!)

Hey, I like CodeKeeper. Is that a crime?

[img src=http://blanky.pt-web.net/ddd.gif] >::p
Skeletor
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 10th Sep 2004 07:17
I just used the Replace all myvar with myvar(0) cause I tried Global but it didnt understand the command in my version of darkedit.


http://www.angelfire.com/games5/db_games/
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 10th Sep 2004 07:58
You need to turn it on in Edit Options. Under the Editor Options tab check the GLOBAL extended syntax box.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!

Login to post a reply

Server time is: 2025-05-24 21:05:54
Your offset time is: 2025-05-24 21:05:54