This error message occurs when the compiler can determine that a constant is outside the legal range. This can occur for instance if you assign a constant to a variable of subrange type.
program Produce;
var
Digit: 1..9;
begin
Digit := 0; (*Get message: Constant expression violates subrange bounds*)
end.
program Solve;
var
Digit: 0..9;
begin
Digit := 0;
end.|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
|
What do you think about this topic? Send feedback!
|