1个过程声明及调用
代码
1 unit Unit1;
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 StdCtrls;
8
9 type
10 TForm1 = class(TForm)
11 Button1: TButton;
12 procedure Button1Click(Sender: TObject);
13 private
14 { Private declarations }
15 public
16 { Public declarations }
17 x,y,z:string;
18 procedure strfu(x1,x2,x3:string);
19 end;
20
21 var
22 Form1: TForm1;
23
24 implementation
25
26 {$R *.DFM}
27 procedure Tform1.strfu(x1,x2,x3:string);
28 begin
29 x:='x1';
30 y:='x2';
31 z:='x3';
32 end;
33 procedure TForm1.Button1Click(Sender: TObject);
34 begin
35 strfu(x,y,z);
36 showmessage(x);
37 showmessage(y);
38 showmessage(z);
39 end;
40 end.
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 StdCtrls;
8
9 type
10 TForm1 = class(TForm)
11 Button1: TButton;
12 procedure Button1Click(Sender: TObject);
13 private
14 { Private declarations }
15 public
16 { Public declarations }
17 x,y,z:string;
18 procedure strfu(x1,x2,x3:string);
19 end;
20
21 var
22 Form1: TForm1;
23
24 implementation
25
26 {$R *.DFM}
27 procedure Tform1.strfu(x1,x2,x3:string);
28 begin
29 x:='x1';
30 y:='x2';
31 z:='x3';
32 end;
33 procedure TForm1.Button1Click(Sender: TObject);
34 begin
35 strfu(x,y,z);
36 showmessage(x);
37 showmessage(y);
38 showmessage(z);
39 end;
40 end.



浙公网安备 33010602011771号