Operators

From MiniScript Wiki
Revision as of 03:21, 8 February 2021 by JoeStrout (talk | contribs)
Jump to navigation Jump to search

MiniScript defines the following operators (listed in order from lowest to highest precedence):

Operator Meaning
A = B assignment
A or B logical OR: true if either operand is true
A and B logical AND: true if both operands are true
not A logical negation: true if its operand is false, and vice versa
A isa B type checking
A == B equality comparison: true if operands are equal
A != B inequality comparison: true if operands are not equal
A > B greater-than comparison
A < B less-than comparison
A >= B greater-than or equal-to comparison
A <= B less-than or equal-to comparison
A + B addition or concatenation
A - B subtraction or string trimming
A * B multiplication or replication
A / B division or reduction
-A unary minus (numeric negation)
new A instantiation
@A address-of (reference function without invoking it)
A ^ B power: A raised to the power of B
A.B dot operator