iDevOS CALC "EXISTS" Command
See if an entity exists (immediate name).
Description
CALC( y, name, "EXISTS" ); // y = exists("name") = does entity name exist?
This command checks to see if the given entity called name exists, ie has been created. The value y will be set to 1 if the entity exists or 0 if it does not.
A test for the existence of an entity whose name is provided in a text variable can also be tested using "VEXISTS".
Parameters
y- Calculation result.
Parameter type: entity name of a numeric variable (egU8,S32,FLT3etc). name- Entity Name.
Parameter type: immediate entity name. "EXISTS"- CALC command operator.
Parameter type: immediate string.
Examples
Example 1
VAR(res, 0, U8); // Result // Assume the entity test has not been created. CALC(res, test, "EXISTS"); // res = 0 // Create the entity test. VAR(test, 99, U8); CALC(res, test, "EXISTS"); // res = 1

