Registriert seit: 27. Apr 2005
Ort: Görlitz
1.358 Beiträge
Delphi XE2 Professional
|
Re: function in procedure
17. Apr 2007, 14:41
Lösung:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
function summe(): Integer;
var a,b: Integer; //:)
begin
a := strtoint(Edit1.text);
b := strtoint(Edit2.Text);
result := a + b;
end;
var wert: Integer;
begin
wert := summe; //() nicht genügend wirkliche Parameter ... war gestern :)
Label1.Caption := inttostr(wert);
end;
end.
Benjamin Schwarze If I have seen further it is by standing on the shoulders of Giants. (Isaac Newton)
|