Prev | Current Page 502 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


Remember that to compile the previous example and every piece of code that uses Templo, the
Motion - Twin library must be appended to the compilation command line using the switch - lib mtwin .
Differences in Expressions Between haxe.Template
and mtwin.Templo
Templo is much smarter than the Template class in many ways because it uses the Neko engine for
parsing and generating results. The main differences between the two are:
Constant values are not limited to integers and can also be float or string values. A string value
must be enclosed in single or double quotes.
Values must not be grouped in pairs; the standard precedence conventions for mathematical
operators will be applied.
The modulo operator is also supported (for example, ::2%3:: ).
The dot syntax can also be used to access object functions and not just variables. Variables
with getter and setter methods cannot be used; the corresponding function must be used in
their place.
It is possible to access array elements using the square bracket syntax.


Pages:
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514