@treeform, that's the way it's usually done, but the idea is to prevent 
redundant naming for those entities that represent the same. If either the 
labels or the field names can be duplicated, then the code from then forward is 
cleaner and less cryptic.

Here how it works in Pascal, for the 1D, 2D and 3D part. It doesn't look as 
nice, but the principle is the same: field x will be shared by 1D, 2D and 3D 
points; field y for 2D and 3D; and field z will only be used by 3D.
    
    
     Type
      Point = Record
              X : Longint;
              Case byte of
                2 : (Y : Longint;
                     case byte of
                     3 : (Z : Longint);
                     );
              end;
    
    
    
    Run

That's the way is not done that way because 

Reply via email to