Согласно документации , вы можете использовать функцию ord
.
type
CompassDirections = enum
cdNorth, cdEast, cdSouth, cdWest
for direction in ord(low(CompassDirections))..
ord(high(CompassDirections)):
echo CompassDirections(direction), " ord: ", direction
var ordinal = low(int)
inc ordinal
dec ordinal
echo high(char)