Hi all

I have problems declaring a nested structure. Here is a generic description of what i have:

Code:
struc_child STRUC
member1 dd ?
member2 dd ?
struc_child ENDS

struc_root STRUC
rmember1 dd ?
rmember2 dd ?
childs  struc_child 2 dup (<?>)
struc_root ENDS

.DATA

root1 struc_root <3,3,<44,33>,<11,55>>


I cant find a way to declare "root1" in order to assemble properly. I want to initialise all members of root1, all its members and all its childs. How do i declare it?

Thanks
Eugen
Posted on 2005-07-29 06:42:20 by Eugen
Just change
"childs  struc_child 2 dup (<>)"
to

child1  struc_child <>
child2  struc_child <>
Posted on 2005-07-29 06:58:53 by Ultrano
This will work

struc_child STRUC
? member1 dd ?
? member2 dd ?
struc_child ENDS

struc_root STRUC
? rmember1 dd ?
? rmember2 dd ?
? child1? ?struc_child <?>
? child2? ?struc_child <?>
struc_root ENDS

.DATA

root1 struc_root <3,3,<44,33>,<11,55>>


Biterider
Posted on 2005-07-29 07:01:06 by Biterider
Hi Ultrano, Biterider,

Actualy, as i was saying, the code sample is generic, in reality "2 dup" is "10 dup" or more :D.
However, i found a way, not the best, but good enough:

struc_root STRUC
rmember1 dd ?
rmember2 dd ?
childs  struc_child <?>,<?>,<?>,...
struc_root ENDS

.DATA

root1 struc_root <3,3,{ <44,33>,<11,55>,... } >



Eugen
Posted on 2005-07-29 07:08:10 by Eugen