getGlobalType()
The function queries the type of the specified global variables.
Synopsis
int getGlobalType(string globaleVariableName);
Parameters
Parameter | Description |
---|---|
globaleVariableName | Name of the global variables, for example, "v1" |
Return value
The function returns -1 if a variable does not exist or else a respective integer value.
Error
Missing or incorrect parameters.
Description
The function queries the type of the specified global variables and returns -1 if a variable does not exist.
Example
In the following example,depending on the return from the function getGlobalType(), the script displays different information.
main()
{
int itype;
dyn_string globaleVariableNames;
dyn_int globaleVariableTypes;
addGlobal("Test", INT_VAR);
itype = getGlobalType("Test");
switch( itype )
{
case ANYTYPE_VAR: Debug( "ANYTYPE_VAR" ); break;
case DYN_FLOAT_VAR: Debug( "DYN_FLOAT_VAR" ); break;
case TIME_VAR: Debug( "TIME_VAR" ); break;
case INT_VAR: Debug ("INT_VAR"); break
}
}
Assignment
Miscellaneous functions
Availability
CTRL