static method III



static_method III
Smart pascal source code
type TStatic = class class function Test(a: Integer): String; static; begin Result := IntToStr(a); end; end; type TSubStatic = class(TStatic) class function Test(a: Integer): String; static; begin Result := TStatic.Test(a + 1); end; end; WriteLn(TStatic.Test(1)); WriteLn(TSubStatic.Test(2)); {<<< RESULT - CONSOLE LOG >>> ----------------------------- 1 3 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}