Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
- type
- TForm1 = class(TForm)
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- type
- Tblabla = class(TObject)
- Surname: String;
- Year: Integer;
- function haha(i: integer): string;
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- function Tblabla.haha(i: integer): string;
- begin
- result:=IntToStr(i);
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- var blabla1: Tblabla;
- begin
- blabla1:=Tblabla.Create;
- blabla1.Year:=40;
- blabla1.Surname:=blabla1.haha(blabla1.Year);
- showmessage(blabla1.Surname);
- FreeAndNil(blabla1);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement