
12.5.5.8 Other
Operator
Example
Explanation
[ ]
a[e]
Array index: The result is the entry at position e of array a.
{ }
a{e}
Array index: The result is the index at position e of "packed" array a:
( )
f(e1, e2, ... eN)
The result is the value that is returned by function f. The function is called up
with parameters e1, e2, ... eN. The sequence of the evaluation of the
parameters is not defined. (The implementation of the script engine may
evaluate the parameters in reverse order.)
? :
e1 ? e2 : e3
The result is either e2 or e3, depending on the value of e1. The conditional
expression is a composite expression with a two-part operator, "?" and ":".
The expression e2 is evaluated if e1 is logical "true"; e3 is evaluated if e1 is
logical "false".
:
tagname: e
"Tag" overwritten: The value of the expression does not change, although
the "tag" does change.
defined
defined s
Result is "1" if the symbol was defined. The symbol can be a constant or a
global or local variable. The "tag" of the expression is "bool"
sizeof
sizeof s
The result is the number of elements of the specified variable. An element
is an entry for simple variables and for one dimensional arrays. For multi-
dimensional arrays, the result is the number of elements (sub-arrays) in the
highest dimension. Add [] to the name of the array to specify a lower
dimension. The result is 0 if the size of the variable is not known. If this
operator is used in a "default" value of a function, the expression is
executed at the time that the function was called up and not at the time that
the definition was completed.
tagof
tagof s
The result is a unique number that represents the "tag" of the variables, the
constants, the return value of a function or the name of the "tag" title. If this
operator is used in a "default" value of a function, the expression is
executed at the time that the function was called up and not at the time that
the definition was completed.
12.5.5.9 Priority of the operators
The following table groups the operators with the same priority, starting with the highest priority at the top of
the table.
If the evaluation of an expression is not explicitly justified with brackets, it is categorised by the association
rules. For example: a*b/c is equal to (a*b)/c based on the left to right association, and a=b=c is equal to
a=(b=c).
172
Rev. 01
Содержание myDatalogEASY IoTmini
Страница 2: ......
Страница 11: ...Chapter 2 Declaration of conformity Chapter 2 Declaration of conformity Rev 01 11 ...
Страница 12: ......
Страница 34: ......
Страница 66: ......
Страница 78: ......
Страница 82: ......
Страница 186: ......
Страница 194: ......
Страница 196: ......
Страница 202: ......
Страница 205: ...Chapter 19 Document history Chapter 19 Document history Rev Date Changes 01 28 08 2020 First version Rev 01 205 ...
Страница 206: ......
Страница 208: ......