Precedence of operators Foundation
The operators in Xbase++ are arranged in various categories and each category has a specific precedence. Due to this precedence, it is guaranteed that complex expressions involving different data types are correctly evaluated when the partial expressions they contain are not delimited with parentheses. An example of a complex expression using operators of different categories is shown in the following code:
In this line, a logical operation is performed between the results of two comparison operations (one comparing numeric and the other comparing date values). The date comparison also performs addition and uses the result of a function call. The numeric comparison uses postfix decrementing. The evaluation of a complex expression such as this follows these rules:
The precedence of the operators within the various categories is performed as follows in descending order (note that operators shown on the same line have the same precedence):
Using the parentheses (), the order in which partial expressions within a complex expression are evaluated can be explicitly specified. Expressions in parentheses are evaluated first, with the evaluation occurring from the deepest to the highest nested levels.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.