PtrGlobal

Retrieves a "pointer" to a global variable.

Syntax:

PtrGlobal (variable-name)

Parameters:

(s) variable-name specifies a variable name.

Returns:

(s) pointer a pointer string.

 

"variable-name" must have been previously been marked as global using PtrGlobalDefine.

Example:


#DefineFunction CheckGlobalValue()
Ptr_Global_A=PtrGlobal(Global_A)
Ptr_Global_B=PtrGlobal(Global_B)
If *Ptr_Global_A != "Potatoes"
   Message("Error","Global_A is not the expected value")
EndIf
*Ptr_Global_B = 1234
#EndFunction
PtrGlobalDefine( Global_A)
PtrGlobalDefine( Global_B)
Global_A = "Potatoes"
retvalue=CheckGlobalValue()
If Global_B != 1234
   Message("Error","Global_B is not the expected value")
EndIf
See Also:

PtrGlobalDefine, PtrPersistent