KernelDebugRef - Operator Precedence: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
If two or more operators have the same precedence, the expression is evaluated from left to right. '''C''' evaluates unary operators from right to left, which is more intuitive and easier to use. Expressions such as '''poi #60:133''' must be written as '''poi (#60:133)''' because of the way the debugger handles unary operators. | If two or more operators have the same precedence, the expression is evaluated from left to right. '''C''' evaluates unary operators from right to left, which is more intuitive and easier to use. Expressions such as '''poi #60:133''' must be written as '''poi (#60:133)''' because of the way the debugger handles unary operators. | ||
# '''( )''' | |||
# '''| :''' | |||
# '''. # % %% - ! NOT SEG OFF BY WO DW POI PORT WPORT''' (all unary operators) | |||
# '''* / MOD''' | |||
# '''+ -''' | |||
# '''> < >= <=''' | |||
# '''== !=''' | |||
# '''AND XOR OR''' | |||
# '''&& ||''' |
Latest revision as of 23:13, 3 May 2025
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
The precedence of the operators has been changed to be more like C.
If two or more operators have the same precedence, the expression is evaluated from left to right. C evaluates unary operators from right to left, which is more intuitive and easier to use. Expressions such as poi #60:133 must be written as poi (#60:133) because of the way the debugger handles unary operators.
- ( )
- | :
- . # % %% - ! NOT SEG OFF BY WO DW POI PORT WPORT (all unary operators)
- * / MOD
- + -
- > < >= <=
- == !=
- AND XOR OR
- && ||