RAD Studio |  |

Constant Expressions
See Also
Collapse All

A constant expression is an expression that always evaluates to a constant (it is evaluated at compile-time and it must evaluate to a constant that is in the range of representable values for its type). Constant expressions are evaluated just as regular expressions are. You can use a constant expression anywhere that a constant is legal. The syntax for constant expressions is:

Copy Code

    constant-expression:
    Conditional-expression

Constant expressions cannot contain any of the following operators, unless the operators are contained within the operand of a sizeof operator:

- Assignment
- Comma
- Decrement
- Function call
- Increment

See Also

Constants

Integer Constants

Integer Constant Without L Or U

Floating Point Constants

Character Constants

The Three Char Types

Escape Sequences

Wide-character And Multi-character Constants

String Constants

Enumeration Constants

Constants And Internal Representation

Internal Representation Of Numerical Types

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!