I just ran across some code that declares a complex packed record:
aSInt = Integer;
entity = packed Record
Enttype : byte;
field2 : double;
... //continues with other standard fields and then uses this case
CASE aSInt OF
entlin: (linpt1,
linpt2: point);
entln3: (ln3pt1,
ln3pt2: point);
entmrk: (mrkpnt,
mrkvec: point;
mrktyp,
mrksiz: aSInt);
... //other case types
End;
The entlin, entln3, entmrk are constants used to identify specific types. This code confuses me. The case statement is using an aSint, which is an integer, but does not assign it to a variable such as with this:
Case Etype of
entlin: (linpt1,
linpt2: point);
...//etc
end;
where Etype is a variable that conveys the type constant to apply.
How is this code used without an identification of what the aSint? How is the Asint value passed on when the record is used since it varies in size and the type of each instance must known to determine its size and allocate memory and read the data?
aSInt = Integer;
entity = packed Record
Enttype : byte;
field2 : double;
... //continues with other standard fields and then uses this case
CASE aSInt OF
entlin: (linpt1,
linpt2: point);
entln3: (ln3pt1,
ln3pt2: point);
entmrk: (mrkpnt,
mrkvec: point;
mrktyp,
mrksiz: aSInt);
... //other case types
End;
The entlin, entln3, entmrk are constants used to identify specific types. This code confuses me. The case statement is using an aSint, which is an integer, but does not assign it to a variable such as with this:
Case Etype of
entlin: (linpt1,
linpt2: point);
...//etc
end;
where Etype is a variable that conveys the type constant to apply.
How is this code used without an identification of what the aSint? How is the Asint value passed on when the record is used since it varies in size and the type of each instance must known to determine its size and allocate memory and read the data?