Method



Method | procedure
Smart pascal source code
type TMyClass = class method Meth1; method Meth2: Integer; class method Meth3; class method Meth4: String; end; method TMyClass.Meth1; begin WriteLn('Meth1'); end; method TMyClass.Meth2: Integer; begin Result := 123; end; class method TMyClass.Meth3; begin WriteLn('Meth3'); end; class method TMyClass.Meth4: String; begin Result := 'Meth4'; end; var obj = TMyClass.Create; obj.Meth1; WriteLn(IntToStr(obj.Meth2)); obj.Meth3; TMyClass.Meth3; WriteLn(obj.Meth4); WriteLn(TMyClass.Meth4); {<<< RESULT - CONSOLE LOG >>> ----------------------------- Meth1 123 Meth3 Meth3 Meth4 Meth4 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}