16 lines
263 B
Text
16 lines
263 B
Text
|
|
module Enumerations;
|
||
|
|
type
|
||
|
|
Fruits = (apple,banana,cherry);
|
||
|
|
|
||
|
|
var
|
||
|
|
deserts,i: Fruits;
|
||
|
|
|
||
|
|
begin
|
||
|
|
deserts := Fruits.banana;
|
||
|
|
writeln("ord(deserts): ",integer(deserts):2);
|
||
|
|
|
||
|
|
for i := Fruits.apple to Fruits.cherry do
|
||
|
|
writeln(integer(i):2)
|
||
|
|
end
|
||
|
|
end Enumerations.
|