Unions are equal to the case of
construct in a record. Not all things can be translated 1:1, but this can.
Note that packing is a separate issue. Though again probably not a problem in this case.
type
a_config_t = record
config : record
case integer of
0:(dn: record
mode : array[0..9] of ansichar;
name : array[0..9] of ansichar;
end);
1: (sm: record
r: integer;
end);
2: (xo: record
r: integer;
end);
end;
end;
// Delphi has no eq for "struct x" in "struct x {} y" construct, only for the y
a_config = a_config_t;