I
ilovezlaner
Unregistered / Unconfirmed
GUEST, unregistred user!
主要源代码如下:
//客户端
type
//定义一个记录
check_user_server=record
card_num:string;
gua_shi:string;
run_flag:string;
card_money:string;
end;
...
var
user_infor:check_user_server;
...
user_infor.card_num:='555';
user_infor.gua_shi:='0';
user_infor.run_flag:='下机';
user_infor.card_money:='5.5';
check_c.Socket.SendBuf(user_infor,sizeof(user_infor));//发送成功
.....
//服务器端
type
//定义一个记录
check_user_server=record
card_num:string;
gua_shi:string;
run_flag:string;
card_money:string;
end;
...
var
user_infor:check_user_server;
tmp:string;
...
socket.ReceiveBuf(check_user,socket.ReceiveLength);//接收过程没有报错
tmp:=check_user.card_num;//{这里就报错,我跟踪变量发现check_user.card_num根本就
没有被赋值,我不知道是哪个地方错了。。}
//客户端
type
//定义一个记录
check_user_server=record
card_num:string;
gua_shi:string;
run_flag:string;
card_money:string;
end;
...
var
user_infor:check_user_server;
...
user_infor.card_num:='555';
user_infor.gua_shi:='0';
user_infor.run_flag:='下机';
user_infor.card_money:='5.5';
check_c.Socket.SendBuf(user_infor,sizeof(user_infor));//发送成功
.....
//服务器端
type
//定义一个记录
check_user_server=record
card_num:string;
gua_shi:string;
run_flag:string;
card_money:string;
end;
...
var
user_infor:check_user_server;
tmp:string;
...
socket.ReceiveBuf(check_user,socket.ReceiveLength);//接收过程没有报错
tmp:=check_user.card_num;//{这里就报错,我跟踪变量发现check_user.card_num根本就
没有被赋值,我不知道是哪个地方错了。。}