Enum Scope |
Pas2JS pascal source code
type MyEnum = enum(a, b, c = 255, d); type MyFlags = flags(a, b, c); WriteLn(MyEnum.a); WriteLn(MyEnum.b); WriteLn(MyEnum.c); var d := MyEnum.d; WriteLn(MyEnum.d); WriteLn(MyFlags.a); WriteLn(MyFlags.b); WriteLn(MyFlags.c); { <<< CONSOLE OUTPUTS >>> 0 1 255 256 1 2 4 }