H
hyp79
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
EnvPtr,savePtrchar;
s:string;
begin
Envptr:=GetEnvironmentStrings;
savePtr:=EnvPtr;
repeat /*
s:=s+StrPas(EnvPtr);
s:=s+#13#10;
请问这段代码为何能循环
inc(EnvPtr,strlen(EnvPtr)+1);
until EnvPtr^=#0;
*/
FreeEnvironmentStrings(saveptr);
showmessage(s);
end;
var
EnvPtr,savePtrchar;
s:string;
begin
Envptr:=GetEnvironmentStrings;
savePtr:=EnvPtr;
repeat /*
s:=s+StrPas(EnvPtr);
s:=s+#13#10;
请问这段代码为何能循环
inc(EnvPtr,strlen(EnvPtr)+1);
until EnvPtr^=#0;
*/
FreeEnvironmentStrings(saveptr);
showmessage(s);
end;