19-03-2012, 01:38 PM
كود :
uses
windows;
type
t_rec = record
public
procedure ShowMsg(msg : string);
procedure init();
msg : string;
end;
{ t_rec }
procedure t_rec.init;
begin
msg := 'Record string';
end;
procedure t_rec.ShowMsg(msg: string);
begin
MessageBox(0,pchar(msg),'h',0);
end;
var
test : t_rec;
begin
test.init();
test.ShowMsg('Argument String');
end.بدون تجريب الكود الاجراء showMsg سيضهر Argument String او Record String

