News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Slight little problem

Started by donkey, June 06, 2007, 01:57:25 AM

Previous topic - Next topic

donkey

Hi Jeremy,

I was trying to declare an array of structures that contained child structures, for example

SomeStruct STRUCT
element1 DD
element2 DD
element3 DD
ENDS

MyStruct STRUCT
Member1 DD
SubStruct SomeStruct <>
ENDS

DATA SECTION

TestStructs MyStruct 10 DUP <>

CODE SECTION

...


When doing this I get the following error...

QuoteError!
Line 54 of assembler source file (TestIncludes.asm):-
Label of this name already declared:-
TestStructs.SubStruct.element1 DD 0
  In the struct at Line 22 of assembler source file (TestIncludes.asm)

Any idea how I can go about getting an array like this to work ?

Edgar

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

six_L

testStructs  MyStruct 10 DUP (<>)
regards

jorgon

Hi Edgar

This problem arises from the duplicate symbols being created because of the nested structure.
When dealing with the nested structure, GoAsm is normally aware that a DUP has been declared somewhere higher up in the source and does not produce a duplicate label, so this fault shouldn't happen.
I have begun to identify why GoAsm is not aware of this in this particular instance, and I shall provide a fix asap.
Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

jorgon

The fix for this problem is attached.

Thanks for letting me know about this.

[attachment deleted by admin]
Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

donkey

Thanks very much for the fix Jeremy. FYI, the solution works perfectly well in the DATA SECTION but fails with the same error when used in the CODE SECTION, not sure if this is by design.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable