Appendix C. Summary of WMLScript Operators

Operator

Operation

Operands

Result

Precedence: 1 (highest) / Associativity: none

   

++

Increment

Number

Number or invalid

--

Decrement

Number

Number or invalid

+

Unary plus

Number

Number or invalid

-

Unary minus

Number

Number or invalid

~

Bitwise not

Integer

Integer or invalid

!

Logical not

Boolean

Boolean or invalid

typeof

Get datatype

Any

Integer

isvalid

Check if valid/invalid

Any

Boolean

Precedence: 2 / Associativity: lef

   

*

Multiplication

Number,number

Number or invalid

/

Floating-point division

Float,float

Float or invalid

div

Integer division

Integer,integer

Integer or invalid

%

Remainder

Integer,integer

Integer or invalid

Precedence: 3 / Associativity: left

   

+

Addition or string concatenation

Number/string,number/string

Number or string or invalid

-

Subtraction

Number,number

Number or invalid

Precedence: 4 / Associativity: left

   

<<

Shift left

Integer,integer

Integer or invalid

>>

Shift right (signed)

Integer,integer

Integer or invalid

>>>

Shift right (unsigned)

Integer,integer

Integer or invalid

Precedence: 5 / Associativity: left

   

<

Less than

Number/string,number/string

Boolean or invalid

<=

Less than or equal to

Number/string,number/string

Boolean or invalid

>

Greater than

Number/string,number/string

Boolean or invalid

>=

Greater than ...

Get Learning WML, and WMLScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.