Hi,
I'm getting a wrong record size with this declaration
@size returns 6 bytes but it should be 4. When I move wReserved like this:
now, it works. Any ideas ? Thanks.
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.
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;
Definitely a defect.
I'll try and put together a fix for HLA v1.75.
Cheers,
Randy Hyde
I'll try and put together a fix for HLA v1.75.
Cheers,
Randy Hyde