The following Ada95 code snipit allows me to define how the compiler handles the fields of my record.
Will C++ allow me to accomplish this same task and if so could someone supply an example?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
word = 4;
type Msg_Type1 is record
x: Some_Type;
y: Another_Type;
z: Another_Type;
end record;
// ada allows me to rep out my record using the 'for use' clause
for Msg_Type1 use record
x at 0*word range 0..31;
y at 1*word range 0..15;
z at 1*word range 16..31;
end record;