ILE C/C++ Language Reference
An integer compile-time constant is a value that is determined
during compilation and cannot be changed at run time. An integer
compile-time constant expression is an expression that is composed of
constants and evaluated to a constant.
An integer constant expression is an expression that is composed of only
the following:
- literals
- enumerators
- const variables
- static data members of integral or enumeration types
- casts to integral types
- sizeof expressions
You must use an integer constant expression in the following
situations:
- In the subscript declarator as the description of an array bound.
- After the keyword case in a switch statement.
- In an enumerator, as the numeric value of an enum constant.
- In a bit-field width specifier.
- In the preprocessor #if statement. (Enumeration
constants, address constants, and sizeof cannot be specified in a
preprocessor #if statement.)
Related References
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.