K
kenwoo
Unregistered / Unconfirmed
GUEST, unregistred user!
我的程序:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure s(ss:string);
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
s('qqqaaaa');
s('ss');
s('333333333');
end;
procedure tform1.s(ss:string);
var
st:array[0..1000] of char;
begin
strpcopy(st,ss);
form1.memo1.lines.add('1,'+ss);
form1.memo1.lines.add('2,'+st);
end;
end.
如果运行时,前面的 s('qqqaaaa')对后面的 s('ss')产生影响
怎么消除呢?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure s(ss:string);
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
s('qqqaaaa');
s('ss');
s('333333333');
end;
procedure tform1.s(ss:string);
var
st:array[0..1000] of char;
begin
strpcopy(st,ss);
form1.memo1.lines.add('1,'+ss);
form1.memo1.lines.add('2,'+st);
end;
end.
如果运行时,前面的 s('qqqaaaa')对后面的 s('ss')产生影响
怎么消除呢?