Hi,

I'm getting a wrong record size with this declaration


type
Demo: record
wReserved :uns16;
union
signscale :uns16;
record
scale :byte;
sign :byte;
endrecord;
endunion;
endrecord;

#print( "sizeof(Demo) = ", @size( Demo ) )

@size returns 6 bytes but it should be 4. When I move wReserved like this:



type
Demo: record
union
signscale :uns16;
record
scale :byte;
sign :byte;
endrecord;
endunion;
wReserved :uns16;
endrecord;

now, it works. Any ideas ? Thanks.
Posted on 2005-01-23 16:47:16 by arlequin
my problem seems to be related to anonymous record/union. If I add a tag on one or the other, the size is correct.


type
Demo: record
wReserved :uns16;
union <--- u1: union => size ok
signscale :uns16;
record <--- or r1: record => size ok
scale :byte;
sign :byte;
endrecord;
endunion;
endrecord;
Posted on 2005-01-24 03:48:40 by arlequin
Definitely a defect.
I'll try and put together a fix for HLA v1.75.
Cheers,
Randy Hyde
Posted on 2005-01-25 22:02:32 by rhyde