|
||||||||||||
|
|
||||||||||||
Unary operatorsUnary operators take one expression as the operand. Unary plus (!) evaluates an operand, converts it to boolean, and returns its negation. Unary plus (+) takes an integer, float, or string representing an integer or float operand, and returns the same number unchanged. Unary plus (-) takes an integer, float, or string representing an integer or float operand, and returns the negative of the same number. Unary star (*) is an enumeration operator:
Copyof creates a deep copy from an operand. This is the same as the call to ``
Cloneof creates a shallow copy from an operand. The is the same as the call to ``
Sizeof returns the number of elements in the operand.
This is the same as the call to ``
Classof returns the type of operand as
anvil.runtime.Type.
This is the same as the meta attribute `` unary-expr := "!" expr unary-expr := "+" expr unary-expr := "-" expr unary-expr := "*" expriterable unary-expr := "copyof" exprcopyable unary-expr := "cloneof" exprcloneable unary-expr := "sizeof" expr unary-expr := "classof" expr
See also
| Expressions
| Grammar
|
||||||||||||
|
|
||||||||||||