Example:


foo STRUC
UNION
data dd ?
ENDS
foo ENDS

.data

bar foo {10}

I get 2 errors.

A2138 invalid data initializer
A2036 too many initial values for structure: structure

I tried naming the UNION, but that does not work.

Any ideas? Thanks.
Posted on 2003-08-23 12:49:03 by ThoughtCriminal
Unions are initialized in their own angle brackets i.e.:
TestUnions Struct

f0 dd ?
UNION
f1 dd ?
f2 dd ?
ENDS
TestUnions ends
.data
tu TestUnions <1,<3>>

TestUnions Struct
UNION
f1 dd ?
f2 dd ?
ENDS
TestUnions ends
.data
tu TestUnions <<3>>
Posted on 2003-08-23 12:57:30 by donkey
Thank you.


With as much structure mangling as I've been doing, I'm suprised I never ran into this problem before.


The double brackets did the trick << >>
Posted on 2003-08-23 14:15:45 by ThoughtCriminal