Skip to main content

SVAR_Exists

SVAR_Exists (name)

The SVAR_Exists function returns 1 if the specified SVAR reference is valid or 0 if not. It can be used only in user-defined functions.

For example, in a user function you can test if a global string variable exists like this:

SVAR /Z str1 = gStr1    // /Z prevents debugger from flagging bad SVAR
if (!SVAR_Exists(str1)) // No such global string variable?
String/G gStr1 = "" // Create and initialize it
endif

See Also

WaveExists, NVAR_Exists, Accessing Global Variables and Waves