子宫颈癌早期能治好吗:delphi中有无类似共同体的结构

来源:百度文库 编辑:高校问答 时间:2024/05/02 02:58:17
C++中有共同体union,就是几个不会同时存在,共用一个存储空间的。在delphi中有无类似的结构?
或者可以实现类似功能的结构或方法,也可以介绍一点阿。
不过我也看了些书好像似没有的样子。



就是变体型结构变量
type
TShapeList = (Rectangle, Triangle, Circle, Ellipse, Other);
TFigure = record
case TShapeList of
Rectangle: (Height, Width: Real);

Triangle: (Side1, Side2, Angle: Real);
Circle: (Radius: Real);
Ellipse, Other: ();
end;