proc of method



proc_of_method
Smart pascal source code
type TMyObj = class Field: String; procedure Test(a: String); function GetIt: String; end; procedure TMyObj.Test(a: String); begin procedure Loc(b: String); begin Field := a + b; end; Loc(a); end; function TMyObj.GetIt: String; begin function Loc: String; begin Result := Field; end; Result := Loc; end; var o := TMyObj.Create; o.Test('hello'); WriteLn(o.Field); WriteLn(o.GetIt); {<<< RESULT - CONSOLE LOG >>> ----------------------------- hellohello hellohello ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}