STRUC Defined Structures Cannot Be Nested

ID Number: Q67787

5.10 5.10a | 5.10 5.10a

MS-DOS | OS/2

buglist5.10 buglist5.10a fixlist6.00

Summary:

The STRUC command in the Microsoft Macro Assembler (MASM) versions 5.1

and 5.1a does not allow for the definition of nested structures. The

sample code below shows a nested structure definition that gives the

following error:

error A2078: Directive illegal in structure

Microsoft has confirmed this to be a problem in MASM versions 5.1 and

5.1a. This problem was corrected in MASM version 6.0.

Sample Code

-----------

.MODEL SMALL

.DATA

s1 STRUC

f1 db ?

f2 db ?

s1 ENDS

s2 STRUC

f3 db ?

s3 s1 <> ;; this is the nested structure

;; declaration that is illegal

s2 ENDS

end

Additional reference words: 5.10 5.10a