Visual Basic 2005 for Programmers (2nd Edition)

A. Operator Precedence Chart

Operators are shown in decreasing order of precedence from top to bottom with each level of precedence separated by a horizontal line. Visual Basic operators associate from left to right.

Figure A.1. Operator precedence chart.

Operator

Type

TypeOf

type comparison

^

exponentiation

+

unary plus

-

unary minus

*

multiplication

/

division

\

integer division

Mod

modulus

+

addition

-

subtraction

&

concatenation

<<

bitwise left shift

>>

bitwise right shift

=

relational is equal to

<>

relational is not equal to

<

relational less than

<=

relational less than or equal to

>

relational greater than

>=

relational greater than or equal to

Like

pattern matching

Is

reference comparison

Not

logical negation

And

logical AND without short-circuit evaluation

AndAlso

logical AND with short-circuit evaluation

Or

logical inclusive OR without short-circuit evaluation

OrElse

logical inclusive OR with short-circuit evaluation

Xor

logical exclusive OR

Категории