Using nested Case statements for variant fields makes the record show the data fields out of
place.
When I look at a record I want to see the order in which the fields are defined and make them look
just like the original Struct.
Looking at Serge's example you can see that in the first Case statement you have two fields that use
the same location of the main record, the first one is at the top where it should be and the next one is
way at the bottom, but in reality that isn't where it is in memory.. The one at the bottom is just an
overlay of the one at the top but yet there is other field members between, that is miss representing the
layout of the record when looking at it from the coder's perspective.
This all can be easily corrected if the compiler would understand "Anonymous" Records within a define of a
record and the lay out would then represent the layout of the original when viewing it.
for example..
Type Main_Record = Record
Record // << need the ability to do this without a RECORD Tag name.
case byte of
0:(FieldOne:Byte;);
1:(FieldTwo:Word);.
End;
....
End;
if the UNION is named then it is no issue because then you can name the record and it works however,
we have cases where the UNION isn't named and now there is a problem and thus comes along Serge's example
demonstrating the complexity of the format where it now just makes it look like a foreign record compared to the
original
I hope you understand better now.