record const



record_const
Smart pascal source code
type TBase = record Field: String; private const cPrivate = 1; public class const cPublic = 3; procedure WriteLnAll; class procedure ClassWriteLnAll; end; procedure TBase.WriteLnAll; begin WriteLn('From base'); WriteLn(cPrivate); WriteLn(cPublic); end; class procedure TBase.ClassWriteLnAll; begin WriteLn('From class proc'); WriteLn(cPrivate); WriteLn(cPublic); end; var o: TBase; WriteLn('From Outside'); WriteLn(TBase.cPublic); WriteLn(o.cPublic); TBase.ClassWriteLnAll; o.WriteLnAll; {<<< RESULT - CONSOLE LOG >>> ----------------------------- From Outside 3 3 From class proc 1 3 From base 1 3 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}