for in Enum



for in Enumerations
Smart pascal source code
type TMyEnum = (meA, meB, meC); {----- main.pas ----} var i: TMyEnum; Begin for i in TMyEnum do WriteLn(i); WriteLn(''); for i := Low(TMyEnum) to High(TMyEnum) do WriteLn(i); WriteLn(''); for i := meA to meC do WriteLn(i); WriteLn(''); { <<< CONSOLE OUTPUTS >>> 012 012 012 }