ex45.pp 255 B

1234567891011121314151617
  1. Program Example45;
  2. { Program to demonstrate the Ord function. }
  3. Type
  4. TEnum = (Zero, One, Two, Three, Four);
  5. Var
  6. X : Longint;
  7. Y : TEnum;
  8. begin
  9. X:=125;
  10. Writeln (Ord(X)); { Prints 125 }
  11. Y:= One;
  12. Writeln (Ord(y)); { Prints 1 }
  13. end.