iDevOS CALC "EINFO" Command
Get textual information about an entity.
Description
CALC( dst, name, "EINFO" );
This command stores information for the entity called name in the text variable dst.
The text variable dst will contain the information as:
name(entity_type)
The entity_type can be one of the following:
draw- Draw/shape/graph (DRAW) entityfixed- Built-in "fixed" entity, eg a interface nameRS2,AS1,RTC,ADCor timerTIMER0,TIMER1, etcfont- Font (LIB) entityfree- Entity has not been defined (note 'name' is empty in this case)func- Function (FUNC) entityimg- Image (IMG) entityint- Interrupt (INT) entitykey- Key (KEY) entityloop- Loop (LOOP) entitypage- Page (PAGE) entitystruct- Structure (STRUCT) entitystyle- Style (STYLE) entitytext- Text (TEXT) entityundefined- Entity is in an undefined state (has been found in NVRAM but not defined in a mnu file)var- Variable (VAR) entitywav-WAVaudio entity
For variables, the data type is also provided:
name(var.data_type)
The data_type can be none, u8, s8, u16, s16, u32, s32, float, cstring, text, ptr, or fileobj.
If the variable is an array, then the array dimensions are also provided:
name(var.data_type[a]) name(var.data_type[a][b]) name(var.data_type[a][b][c]) name(var.data_type[a][b][c][d])
If the variable is a pointer, then the entity being pointed to is also provided:
name(var.ptr)>name2(entity_type)
Parameters
dst- Result.
Parameter type: entity name of a text variable. name- Entity Name.
Parameter type: immediate entity name of a text variable. "EINFO"- CALC command operator.
Parameter type: immediate string.
Examples
Example 1
STYLE(s1, TEXT) { font=Ascii8; }
TEXT(t1, "abc", s1);
KEY(k1, fn, 20, 30, TOUCH);
VAR(v1, "", TXT);
VAR(v2, 0, U32);
VAR(v3 > "t1", PTR);
VAR(v4, 0, U8, 4, 3, 2);
CALC(v1, s1, "EINFO"); // v1 = "s1(style)"
CALC(v1, t1, "EINFO"); // v1 = "t1(text)"
CALC(v1, k1, "EINFO"); // v1 = "k1(key)"
CALC(v1, v1, "EINFO"); // v1 = "v1(var.text)"
CALC(v1, v2, "EINFO"); // v1 = "v2(var.u32)"
CALC(v1, v3, "EINFO"); // v1 = "v3(var.ptr)>t1(text)"
CALC(v1, v4, "EINFO"); // v1 = "v4(var.u8[4][3][2])"
CALC(v1, v5, "EINFO"); // v1 = "(free)"

