可变记录的实例如下:
type
TVariantRecord=Record
NullStrField:PChar;
IntField:Integer;
Case Ineter of//首先就是这句话有什么,可变记录有什么实际意义
0:(D:double);
1:(I:integer);
2:(C:char);
end;
千万别给我说相当与c++的union,这个我知道,但是他有什么实际意义我就不明白了,到底这么用有什么好处?
---可变记录允许在记录中的数据共同覆盖相同的内存,允许彼此覆盖的数据能被单独访问。
type
TVariantRecord=Record
NullStrField:PChar;
IntField:Integer;
Case Ineter of//首先就是这句话有什么,可变记录有什么实际意义
0:(D:double);
1:(I:integer);
2:(C:char);
end;
千万别给我说相当与c++的union,这个我知道,但是他有什么实际意义我就不明白了,到底这么用有什么好处?
---可变记录允许在记录中的数据共同覆盖相同的内存,允许彼此覆盖的数据能被单独访问。
http://expert.csdn.net/Expert/topic/1390/1390686.xml?temp=.6592523