Onetastic Macro Documentation >
>
Expressions Expressions
Macro statements mostly evaluate expression to read or modify data. Expressions
can be used to assign variables, access object properties,
and do arithmetic, logical or comparison operations.
They can also provide literal values.
"String Literal"
1234
3.5
true
$name
$format
$i = 0
$i += 1
$x = true
$x &&= false
$s = "text"
$s &= " more text"
3 - (5 * 2)
$x || $y
"text" & $str & " more text"
7 > 4
"text" != $x
+3
-5
!$a
($x > 3) ? "yes" : "no"
String_Split($str, ";")
DialogBox_Create("message")
GetCurrentPage().name
$Section.color
$names[0]
$multi_dim_arr[0][1][2]
$Section.pages[1]
A more complex expression can combine all of these simpler expressions:
"Last page in the section has " & ((String_Length($Section.pages[Array_Length($Section.pages) - 1].name) > 0) ? "a name" : "no name")
|