S
stanely
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button5Click(Sender: TObject);
var
s,t:tstringstream;
u:tnmuuprocessor;
begin
s:=tstringstream.Create('abc');
t:=tstringstream.Create('');
u:=tnmuuprocessor.Create(self);
u.InputStream:=s;
u.OutputStream:=t;
u.Encode;
u.InputStream:=t;
u.OutputStream:=s;
u.Decode;
showmessage(s.DataString);
u.Free;
s.Free;
t.Free;
end;
///////////////////
show出来的竟然是'abca'。
为什么?
var
s,t:tstringstream;
u:tnmuuprocessor;
begin
s:=tstringstream.Create('abc');
t:=tstringstream.Create('');
u:=tnmuuprocessor.Create(self);
u.InputStream:=s;
u.OutputStream:=t;
u.Encode;
u.InputStream:=t;
u.OutputStream:=s;
u.Decode;
showmessage(s.DataString);
u.Free;
s.Free;
t.Free;
end;
///////////////////
show出来的竟然是'abca'。
为什么?