Smart pascal source code
type
TEnum = (enOne, enTwo, enThree);
type
TDisj = (d0 = 0, d2 = 2, d4 = 4, d6 = 6, d8 = 8, d10 = 10, d12 = 12);
{ main.pas }
Begin
WriteLn(TEnum.enOne.QualifiedName);
WriteLn(enTwo.QualifiedName);
WriteLn(TEnum(Ord(enTwo) + 1).QualifiedName);
for var e in TEnum do
WriteLn(e.QualifiedName);
for var i := 0 to 12 step 3 do
begin
var
e: TDisj;
e := TDisj(i);
WriteLn(e.QualifiedName);
end;
{ <<< CONSOLE OUTPUTS >>>
TEnum.enOne
TEnum.enTwo
TEnum.enThree
TEnum.enOne
TEnum.enTwo
TEnum.enThree
TDisj.d0
TDisj.?
TDisj.d6
TDisj.?
TDisj.d12
}