Next: Calling Functions
Prev: Variables
C-- provides a variety of
operators to perform arithmetic and logical operations on data. Most of
these operators fall into two syntactical categories: unary
operators and binary operators.
Unary operators act on a single expression value. In C--,
all unary operators are single characters which precede expressions.
For example, !a is the logical negation of the value of the
variable a.
Binary operators act on two expression values. For example,
a + b is the sum of the values of the variables a and
b.
Several operators are neither unary nor binary. The message operator
(.) acts on a value on the left but a message name and an
argument list on the right (see Sending Messages). The index
operator ([]) uses two punctuation marks to delimit the beginning
and end of the offset (see Lists). The conditional operator
(?|) operates on three data values (see Conditional Operators).
Menu: