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 / Its an embarassing newbish question but i'll ask

Author
Message
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 24th Jun 2003 20:28
whats a global???

is it a variable that can be viewed by all programs if so then how do i do this.

i want to know cause if i can make globals i'll be able to have communicating apps.
In our hearts and minds we keep the powers of love, hope and the hidden powers of evil in which we can mold a hero or daemon of ourselves-Book of Enoch Chapter III
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Jun 2003 20:32
A global is a value that is available everywhere in your program.



You'll get output of 1 and 0, because a is global and has been set, but b is not which means that the function creates it's own new variable called b.
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 24th Jun 2003 20:46
so it cant be used to communicatr between programs

In our hearts and minds we keep the powers of love, hope and the hidden powers of evil in which we can mold a hero or daemon of ourselves-Book of Enoch Chapter III
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Jun 2003 20:57
Nope. I did consider adding a set of shared memory commands to my utility plugin, but there just didn't seem to be any real demand for it.

If you want to communicate between DBPro programs, you could always use the multiplayer commands with an IP address of 127.0.0.1, or even use a good old-fashioned file.
TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 24th Jun 2003 21:00
No...

To communicate between programs you could:

1) Use the multiplayer commands to send information to yourself (AKA the other programme)

2) Save a temporary file with the information you need to transfer to the other programme. When the other programme has loaded, it could delete the file again and the user will never notice the file (except if its a large file).

There may be other ways, but these were some I just thought about.


Not up yet --> http://thecyborg.sytes.net/
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 24th Jun 2003 21:01
in Pro you have "write to clipboard" and "get clipboard$", or you could send other programs netmessages internaly, or save data to disk so the other program can read it if speed isn`t an issue, but clipboard would be the fastest, and it is what they made it for, data in the clipboard will persist after the sending program has closed, cheers.

Mentor.

TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 24th Jun 2003 21:05
LOL!! IanM


Not up yet --> http://thecyborg.sytes.net/
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 24th Jun 2003 21:22
i cant use multiplayer as thats what i need to have connected at the same time as the hidden program transfers things to it.

i demand you make those command IanM x-d (now there is some demand for it)

In our hearts and minds we keep the powers of love, hope and the hidden powers of evil in which we can mold a hero or daemon of ourselves-Book of Enoch Chapter III
hooray_for_db
23
Years of Service
User Offline
Joined: 11th Jul 2003
Location: United States
Posted: 11th Jul 2003 23:44
Do I understand correctly that in DB all variables in global? DBP (which I don't have yet) lets you distinguish between local and global variables?

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 12th Jul 2003 00:03
If you want to communicated between programs, you've also got Atoms...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins and other exciting things - oh my, yes!

Login to post a reply

Server time is: 2026-07-18 07:53:17
Your offset time is: 2026-07-18 07:53:17