T
talent002
Unregistered / Unconfirmed
GUEST, unregistred user!
type
myrecord=record
username:string[20];
passwd:string[20];
end;
...
...
var
pointer
st:string;
begin
st:=idtcpclient1.readln();
if st='login' then
begin
p:=getmem(40);
idtcpclient1.readbuffer(p^,40);
//请问这里用什么方法能把p的类型转换成myrecord类型?
end;
if st=其它.. then
begin
p:=getmem(XX);<<如果不是登陆就转换为其它的record类型.
freemem(p);
myrecord=record
username:string[20];
passwd:string[20];
end;
...
...
var
pointer
st:string;
begin
st:=idtcpclient1.readln();
if st='login' then
begin
p:=getmem(40);
idtcpclient1.readbuffer(p^,40);
//请问这里用什么方法能把p的类型转换成myrecord类型?
end;
if st=其它.. then
begin
p:=getmem(XX);<<如果不是登陆就转换为其它的record类型.
freemem(p);