I'm slightly confused trying to figure a section of ISO Pascal.
The grammar allows you to do this:
type RPoint = Record
Case Boolean of
False : (X,Y,Z : Real);
True : (R,theta,phi : Real);
var p: RPoint;
p.x := 1;
case MyVal: Boolean
With each variant-part shall be associated a type designated the selector-type possessed by the
variant-part . If the variant-selector of the variant-part contains a tag-field, or if the case-constant-
list of each variant of the variant-part contains only one case-constant, then the selector-type shall
be denoted by the tag-type, and each variant of the variant-part shall be associated with those
values specified by the selector-type denoted by the case-constants of the case-constant-list of the
variant . Otherwise, the selector-type possessed by the variant-part shall be a new ordinal-type that
is constructed to possess exactly one value for each variant of the variant-part, and no others, and
each such variant shall be associated with a distinct value of that type.
case Boolean of
Here your variant record has two possible 'personalities'. Boolean is a type with two possible values. So, it seemed like a logical choice. But, it doesn't have to be Boolean.
You could have used some other ordinal type such as Integer or Byte to get the same effect. For example:
type RPoint = Record Case Byte of 0: (X,Y,Z : Real); 1: (R,theta,phi : Real); end;