Language Elements and Reference:xpplrm

Operators Foundation

Operators are an essential component of program code. They perform operations using one or more operands and provide a result. An operand is generally a literal or a variable, but it can also be an expression. Xbase++ distinguishes different categories of operators, each of which is described in this chapter. Operators can generally be used only with a subset of the available data types and often with only a single data type.

Operators can be unary or binary. Unary operators complete an operation using only one operand. Binary operators always require two operands. For some unary operators the position relative to the operand is significant. In these cases, there is a difference between prefix notation (the operator appears in front of the operand) and postfix notation (the operator appears after the operand).

Assignment operators

Increment and decrement operators

Mathematical operators

Comparison operators

Logical operators

Special operators

Precedence of operators

Feedback

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.