O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required