Prev | Current Page 487 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

empty() method, as in the previous example, and not the { } convention, which is the
usual one for those who come from ActionScript or JavaScript. The { } is a valid expression in haXe
but has a different meaning; it is a code block and it is equivalent to null, because the block does not
contain any return value.
Comparison Expressions
In the same way as happens for mathematical expressions, a comparison must be enclosed in rounded
parentheses. The following comparison operators are allowed: < , > , < = , > = , and == .
The result of a comparison operation will output the true or false string, or can be used inside a more
complex logical expression as described next. A Boolean value can be negated prefixing it with the !
operator. So the comparison ::!(1 < 2):: will display false . Boolean values can also be combined with
the standard AND ( & & ) and OR ( || ) operators.
Dot Expressions
A field in the data object must not be necessarily a primitive value; it can also be an object itself. In this
case the standard dot operator will be used to specify the full path to the desired value.


Pages:
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499