Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter ThreeData Types and Operators (continued)

3.18 Unary Operators

Unary operators apply in two general manners: pre/post-fix style to increment or decrement a variable and logical math types.

3.18.1 The ‘++’ and ‘--’ Operators

The ++ and -- operators will either increment or decrement an integer variable either before or after evaluation. If set as a prefix, ++i, the value of i will have 1 added and that value will be used in further operations within the statement while i++, the value of i will have 1 added and the remainder of the expression will use the original value of i.

These operators are a convenient method of incrementing counters and indices during loops.

3.18.2 The ‘~’, ‘!’ and ‘-’ Operators

The ~ , ! and - operators can be used as a prefix to either invert, specify a logic NOT or make negative.

Note: A known issue in Legato 1.x parse is leading unary operators on functions do not work since functions are currently loosely typed. Further, -nnn does not work correctly on parameter items following the first parameter. There are work arounds for both conditions by force coding such as (-1) instead of -1.