Hi Folks!
I'm not sure wether it's a feature or a bug but I've read, that setting a case selector in variant records makes some variants unavailable from this point. The following program demonstrates, that setting a case selector allows further overwriting of unselected variants:
program Fail3;
type TGeoType = (Circle, Rect); TGeometry = record X, Y: Integer; case aType: TGeoType of Circle: (Radius: Integer); Rect: (Width, Height: Integer) end;
var Geometry: TGeometry;
begin with Geometry do begin X := 10; Y := 20; aType := Rect; Radius := 30; Width := 40; Height := 50 end end.
Version: ======== Reading specs from /usr/local/bin/../lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs gpc version 20021111, based on gcc-2.95.2 19991024 (release)
Eike