StaticVarGetText
- gets the value of static variable as string

Miscellaneous functions
(AFL 2.60)


SYNTAX StaticVarGetText( ''varname'' )
RETURNS STRING
FUNCTION Gets the value of static variable as string.
The only difference between StaticVarGet is that this function always returns string, so if given static variable does not exist it returns empty string "" instead of Null. Numbers are also converted to string.

Static variable - the variable has static duration (it is allocated when the program begins and deallocated when the program ends) and initializes it to Null unless another value is specified. Static variables allow to share values between various formulas. Array static variables are now supported (version 5.30 and higher)

EXAMPLE myvar = StaticVarGetText("MyVariable");

if( myvar  == "" )
{
  
printf("Not Set");
}
else
{
  
printf("Variable Set: " + myvar);
}
SEE ALSO StaticVarGet() function , StaticVarSet() function , StaticVarSetText() function

References:

The StaticVarGetText function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference