Subrange 数据类型
type 子界类型标识符=常量1..常量2
type
age=1..100;
letter='a' ..'z';
var
a :age;
l :=letter;
begin
a :=120;
end
应用举例
procedure TForm1.Button2Click(Sender: TObject);
type
age=1..100;
letter='A'..'Z';
var
a :age;
ch :letter;
begin
a :=100;
ch :='B';
end;