Normal Topic Static Global Values (Read 778 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Static Global Values
Dec 6th, 2010 at 5:04pm
Print Post Print Post  
Are Static Global Values unique to each Sesame client session, or can two different users change the same static value?

Example;

stat vflag as int = 1

Will user 1 and user 2 both have their own 'vflag' variables within their client sessions?

Is there a known issue with users affecting other users variables?

Steve
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Static Global Values
Reply #1 - Dec 6th, 2010 at 5:11pm
Print Post Print Post  
What you show in your code is a static variable declared in the global code area, not a Global Static Value.

Each instance of a form/report/mass update has it's own global code area, so each client would have their own separate vflag.

Global Static Values are stored in the application itself. They are shared by all forms/report/code in all Clients using a particular application and they persist even if that application is closed and reopened. You access these using GlobalValue and @GlobalValue.

For a value that is available across all forms/reports/code, but only to a single client for a single session, use ClientLocalValue.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Static Global Values
Reply #2 - Dec 6th, 2010 at 5:44pm
Print Post Print Post  
Thanks for clarifying, Erika. Very helpful.
  
Back to top
IP Logged