Sets the value of a global integer variable. Global variables are accessible for all users running on all agents.
Kernel.bdh
GlobalVarSet( in sVariable : string, in nValue : number, in nTimeout : number optional ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sVariable | Name of the global variable whose value is to be set. |
nValue | Value that is assigned to the global variable. |
nTimeout |
Optional: Timeout for setting the value in seconds. If the specified time period is exceeded,
Silk Performer indicates an error.
The function’s default behavior is to wait until the set operation is done. |
dcltrans transaction TInit begin if GetUserID() = 1 then GlobalVarSet("global counter", 1000); end; GlobalWaitFor("All", ALL_USERS); end TInit;