The following tables shows how automatic coercion is applied to a general expression
RESULT = OPND1 op OPND2
RESULT OPND1 OPND2 int int int float float float string string string float float int float int float string string int int int string string string float float float string explicit coercion between types
$val coerce any value to string int(val) coerce to integer any value of type
- int
- float
- string
- obj_id
- ctl_id
float(val) coerce real any value of type
- int
- float
- string
coercion of structures and arrays to strings
(packing structures and arrays into strings)structuresarraystmp = pack(val)
format of packed string
{member1=value}{member2=value}{member3=value}{memberN=value} where member is the name of the member within the structure
A two dimensional array would be packed so:tmp = pack(val)
format of packed string
[value0][value1][value2][valueN] where valueN is the value of element N of the arrays
[ [Jval0][Jval1][JvalN] ][ [Kval0][Kval1][KvalN] ][ [Lval0][Lval1][LvalN] ]A structure within a structure would be packed so:
{Jmem1=value}{Jmem2={Kmem1=value}{Kmem2=value}{KmemN=value}}{Jmem3=value}{JmemN=value} Arrays of structures
[ {J1=value}{J2=value}{JN=value} ][ {K1=value}{K2=value}{KN=value} ]Structure containing an array
{member1=value}{member2=[value0][value1][value2][valueN]}{member3=value}{memberN=value}