Special Constants
This example creates a buffer array of records.
hbuf = NewBuf() rec = "name=\"Joe Smith\";age=\"34\";experience=\"guru\""
AppendBufLine(hbuf, rec) rec = "name=\"Mary X"\";age=\"31\";experience=\"intern\""
AppendBufLine(hbuf, rec)
// hbuf now has 2 records in it
...
rec = GetBufLine(hbuf, 0) // retrieve element at index 0
PutBufLine(hbuf, 1, rec) // store element at index 1
CloseBuf(hbuf)
See “File Buffer Functions” on page 388.
Special Constants
Some constant values are always defined while a macro is running. As with all other identifiers, the constant names are not case sensitive.
Constant
True
False
Nil hNil invalid
Table 5.2: Runtime Constants
Value
"1"
"0"
"" – the empty string.
"0" – an invalid handle value.
"-1" – an invalid index value.
Operators
Most binary operators are the same as in C. Operator precedence is the same as C. You can also use parentheses to group expressions.
Operator
+ and -
* and /
!
++i and i++
--i and i--
||
&&
!=
==
<
Table 5.3: Operators
Meaning
add and subtract multiply and divide
Invert or "Not". E.g. !True equals False.
pre and post increment pre and post decrement logical OR operation logical AND operation logical NOT EQUAL operation logical EQUAL operation less than
Source Insight 4 User Guide 375