string类型,你真的了解吗?
我定义了一个记录类型:
TCommBlock = record // the Communication Block used in both parts (Server+Client)
Command,
MyUserName, // the sender of the message
acciid, // the message itself
ReceiverName: string[255]; // name of receiver
Msg:widestring;
end;
1、ReceiverName: string[255]; 是什么意思?最长是256个字节吗?我这个记录是网络中传输的,如果这样定义:ReceiverName: string;则程序会产生错误。
2、receivername字段是可能是超过1000的字符串,这样的变量怎么定义?
3、string、shortstring、AnsiString、WideString,到底有什么区别?