Normal Topic Advanced: Scope of Global Variables (Read 557 times)
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Advanced: Scope of Global Variables
Feb 6th, 2004 at 2:44pm
Print Post Print Post  
Does anyone know what the scope of global variables is? I am using one to share information between a form and a subform. My only concern is what the scope of it is in a multi-user sistuation. Would the global variable be user dependant, application dependent or database dependant.

From the description of how the client/server situation is handled all programming seems to be handled on the client side so that would indicate it is not application dependent... but what if a user opens up 2 copies of Sesame would each one have a copy of the global variable or would they share it?

If anyone has any ideas please let me know.

Thanks,

Justin
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Advanced: Scope of Global Variables
Reply #1 - Feb 6th, 2004 at 2:56pm
Print Post Print Post  
Quote:
From the description of how the client/server situation is handled all programming seems to be handled on the client side so that would indicate it is not application dependent... but what if a user opens up 2 copies of Sesame would each one have a copy of the global variable or would they share it?


If it is a variable declared in the GLOBAL CODE area and is declared as static - they would each have their own, because - as you said, it runs in each client.

If it is a GlobalValue - using the @GlobalValue/GlobalValue functions - then they would share it, because GlobalValues are stored on the server.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: Advanced: Scope of Global Variables
Reply #2 - Feb 6th, 2004 at 3:09pm
Print Post Print Post  
Hmm I was doing it using the @GlobalVariable function. By defining a variable in the Global Code section does that mean it would be accessible to the subforms code as well?

Justin
  
Back to top
 
IP Logged