globalExists()

This function queries whether a specific global variable exists.

Synopsis

bool globalExists(string globaleVariableName);

Parameters

Parameter Description
globaleVariableName Name of the global variable

Return value

The function returns TRUE if the variable exists or else, FALSE.

Error

Errors can be queried with getLastError() (missing or incorrect parameters).

Description

This function queries whether the specified global variable exists.

Example

main()
{
  addGlobal("v1", ANYTYPE_VAR );
  addGlobal("v2", DYN_FLOAT_VAR );
  addGlobal("v3", TIME_VAR );
  addGlobal("Test", INT_VAR );
  bVar = globalExists( "XXX" );
  DebugN( "The variable XXX doesn't exist, so bVar has to be
  false:", bVar );
  bVar = globalExists( "v2" );
  DebugN("The variable v2 exists, so bVar has to be true:", bVar
  );
}

Assignment

Miscellaneous functions

Availability

CTRL