- MODULE TConvConst;
- // ISO type conversion in a CONST initialiser: a subrange applied to a
- // constant folds to that constant (representation-preserving).
- TYPE ind = [-100..100];
- CONST low = ind(-100); high = ind(100);
- VAR ExitCode : INTEGER;
- BEGIN
- ExitCode := low + 100 + (high - 100) + 42 (* 0 + 0 + 42 *)
- END TConvConst.
|