Relational and logical expressions  Arithmetic operators

Chapter 4: Expressions, Identifiers, and Wildcard Characters

Operator precedence

Operators have the following precedence levels, where 1 is the highest level and 6 is the lowest:

  1. unary (single argument) – + ~

  2. * / %

  3. binary (two argument) + – & | ^

  4. not

  5. and

  6. or

When all operators in an expression are at the same level, the order of execution is left to right. You can change the order of execution with parentheses—the most deeply nested expression is processed first.





Copyright © 2005. Sybase Inc. All rights reserved. Arithmetic operators

View this book as PDF