static method II



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