fpc/docs/refex/ex45.pp
1998-03-25 11:26:49 +00:00

18 lines
255 B
ObjectPascal

Program Example45;
{ Program to demonstrate the Ord function. }
Type
TEnum = (Zero, One, Two, Three, Four);
Var
X : Longint;
Y : TEnum;
begin
X:=125;
Writeln (Ord(X)); { Prints 125 }
Y:= One;
Writeln (Ord(y)); { Prints 1 }
end.