GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Three — Data Types and Operators (continued)
The basic assignment operator is “=”. The first inclination might be to think of this as “equal to” (equal to is expressed as “==”). It really means that the left operand gets set to the value of the expression on the right (that is, “gets set to”). The left side of an assignment expression is considered the “l-value” while the right side is the “r-value”. L-values must always be a variable.
As a shortcut, certain math operations can be combined. For example:
a = a * 6;
is the same as
a *= 6;
Assignment is always the last step in an expression.
The following table expresses the types of assignments and the types of data allowed.
Operator | Description | Integer | Float | String | Handle | Cluster |
= | Assign | x | x | x | x | x |
+= | Add and assign | x | x | x | — | x |
-= | Subtract and assign | x | x | — | — | x |
*= | Multiply and assign | x | x | — | — | x |
/= | Divide and assign | x | x | — | — | x |
%= | Modulo and assign | x | — | — | — | x |
|= | Logical OR and assign | x | — | — | — | x |
&= | Logical AND and assign | x | — | — | — | x |
^= | Logical XOR and assign | x | — | — | — | x |
.= | Concatenate as assign | — | — | x | — | x |
The cluster types are only allowed if the variables are compatible and they can be arrays or structures.
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.