Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 2 User Interface

Operator Precedence

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The precedence ranking of an operator determines the order in which it is evaluated in an expression. The levels of ranking are:

PrecedenceOperators
highest[ ]
. NOT, BNOT
. <<, >>, BAND, BOR
. *, /, MOD, AND
. +, -, OR
lowest<, <=, =, >, >=, <>

Operators of highest precedence are evaluated first. For example, since * ranks above +, the following expressions are evaluated identically:



   (x + y * z)    and    (x + (y * z))


When operators in a sequence have equal precedence, evaluation proceeds from left to right. For example, each of the following expressions are evaluated identically:



   (x + y + z)    and    ((x + y) + z)


Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.