addGlobal()
Creates a variable and makes it into a control-wide variable.
Synopsis
int addGlobal(string name, unsigned type);
Parameter
Parameter | Description |
---|---|
type | Type |
name | Designation |
Return Value
If successful 0, in the event of an error -1.
Errors
Incorrect argument or invalid variable type.
Description
Creates a variable of the type "type" with the designation "name" and makes it into a control-wide variable (only restricted to the current manager).
Table: List of possible data types
ANYTYPE_VAR | DYN_ANYTYPE_VAR | DYN_DYN_ANYTYPE_VAR |
TIME_VAR | DYN_TIME_VAR | DYN_DYN_TIME_VAR |
FILE_VAR | ||
BOOL_VAR | DYN_BOOL_VAR | DYN_DYN_BOOL_VAR |
INT_VAR | DYN_INT_VAR | DYN_DYN_INT_VAR |
UINT_VAR | DYN_UINT_VAR | DYN_DYN_UINT_VAR |
FLOAT_VAR | DYN_FLOAT_VAR | DYN_DYN_FLOAT_VAR |
STRING_VAR | DYN_STRING_VAR | DYN_DYN_STRING_VAR |
LANGSTRING_VAR | DYN_LANGSTRING_VAR | DYN_DYN_LANGSTRING_VAR |
BIT32_VAR | DYN_BIT32_VAR | DYN_DYN_BIT32_VAR |
CHAR_VAR | DYN_CHAR_VAR | DYN_DYN_CHAR_VAR |
DPIDENTIFIER_VAR | DYN_DPIDENTIFIER_VAR | MAPPING_VAR |
BLOB_VAR | DYN_BLOB_VAR | |
ATIME_VAR | DYN_DYN_ERRCLASS_VAR | |
ERRCLASS_VAR | DYN_ERRCLASS_VAR |
Example
A global integer variable named "counter" is created.
main()
{
addGlobal("zaehler",INT_VAR);
// creation of the variable
zaehler = 15;
//counter can now be assigned a value
}
Assignment
Various functions
Availability
CTRL