static method I



static_method 1
Smart pascal source code
type TStatic = class class procedure WriteLn; static; begin Default.WriteLn('Hello '); Default.WriteLn(ClassName); end; end; type TSubStatic = class(TStatic); TStatic.WriteLn; var c := TStatic; c.WriteLn; var o := TStatic.Create; o.WriteLn; TSubStatic.WriteLn; var cs := TSubStatic; cs.WriteLn; var os := TSubStatic.Create; os.WriteLn; {<<< RESULT - CONSOLE LOG >>> ----------------------------- Hello TStatic Hello TStatic Hello TStatic Hello TStatic Hello TStatic Hello TStatic ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}