Scripting:Operators
From STNE Wiki
(Difference between revisions)
Line 1: | Line 1: | ||
+ | == Table == | ||
+ | In this section, a and b represent either literal values, object references or expressions evaluating to the appropriate type. | ||
+ | |||
+ | === String operators === | ||
+ | |||
{| cellpadding="3" | {| cellpadding="3" | ||
- | ! Operator !! Syntax | + | ! Operator name !! Syntax |
- | + | ||
- | + | ||
|- | |- | ||
| Concatenation || a & b | | Concatenation || a & b | ||
- | | | + | |} |
- | | | + | |
+ | |||
+ | === Comparison operators === | ||
+ | |||
+ | {| cellpadding="3" | ||
+ | ! Operator name !! Syntax | ||
|- | |- | ||
| Equal to || a = b | | Equal to || a = b | ||
Line 21: | Line 29: | ||
|- | |- | ||
| Reference equal to || a Is b | | Reference equal to || a Is b | ||
+ | |} | ||
+ | |||
+ | |||
+ | === Arithmetic operators === | ||
+ | |||
+ | {| cellpadding="3" | ||
+ | ! Operator name !! Syntax | ||
|- | |- | ||
- | | | + | | Assignment || a = b |
|- | |- | ||
| Addition || a + b | | Addition || a + b | ||
Line 32: | Line 47: | ||
| Division || a / b | | Division || a / b | ||
|- | |- | ||
- | | | + | | Increment || a++ |
+ | |- | ||
+ | | Increment || ++a | ||
+ | |- | ||
+ | | Decrement || a-- | ||
+ | |- | ||
+ | | Decrement || --a | ||
+ | |} | ||
+ | |||
+ | |||
+ | === Logical operators === | ||
+ | |||
+ | {| cellpadding="3" | ||
+ | ! Operator name !! Syntax | ||
|- | |- | ||
| Logical NOT || NOT a | | Logical NOT || NOT a | ||
Line 39: | Line 67: | ||
|- | |- | ||
| Logical OR || a OR b | | Logical OR || a OR b | ||
+ | |} | ||
+ | |||
+ | === Other operators === | ||
+ | |||
+ | {| cellpadding="3" | ||
+ | ! Operator name !! Syntax | ||
+ | |- | ||
+ | | Function call || a() | ||
+ | |- | ||
+ | | Function reference || AddressOf a | ||
+ | |- | ||
+ | | Member b of a || a.b | ||
|} | |} |
Revision as of 15:49, 10 September 2010
Contents |
Table
In this section, a and b represent either literal values, object references or expressions evaluating to the appropriate type.
String operators
Operator name | Syntax |
---|---|
Concatenation | a & b |
Comparison operators
Operator name | Syntax |
---|---|
Equal to | a = b |
Not equal to | a <> b |
Greather than | a > b |
Less than | a < b |
Greather than or equal to | a >= b |
Less than or equal to | a <= b |
Reference equal to | a Is b |
Arithmetic operators
Operator name | Syntax |
---|---|
Assignment | a = b |
Addition | a + b |
Subtraction | a - b |
Multiplication | a * b |
Division | a / b |
Increment | a++ |
Increment | ++a |
Decrement | a-- |
Decrement | --a |
Logical operators
Operator name | Syntax |
---|---|
Logical NOT | NOT a |
Logical AND | a AND b |
Logical OR | a OR b |
Other operators
Operator name | Syntax |
---|---|
Function call | a() |
Function reference | AddressOf a |
Member b of a | a.b |