type
TFoo = (A, B, Foo);
{$SCOPEDENUMS ON}
TBar = (A, B, Bar);
{$SCOPEDENUMS OFF}
begin
WriteLn(Integer(Foo));
WriteLn(Integer(A)); // TFoo.A
WriteLn(Integer(TBar.B));
WriteLn(Integer(TBar.Bar));
WriteLn(Integer(Bar)); // Error
end;
No comments:
Post a Comment