Class Const as Property



Class with Const as Property
Pas2JS pascal source code
type TBase = class class const c1 = 1; const c2 = 2; property p1 : Integer read c1; property p2 : Integer read c2; end; { unit1.pas } var o := TBase.Create; Begin WriteLn(TBase.P1); // 1 WriteLn(TBase.P2); // 2 WriteLn(o.P1); // 1 WriteLn(o.P2); // 2