FIX: A2138, A2036 or Hang, Init Nested Structure ArrayLast reviewed: September 16, 1997Article ID: Q94912 |
6.00 6.00a 6.00b | 6.00 6.00a 6.00b
MS-DOS | OS/2kbtool kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSAn attempt to assemble code that initializes an array of nested structures fails and the computer hangs and stops responding or the assembler produces the following messages:
error A2138: invalid data initializer error A2036: too many initial values for structure RESOLUTIONTo work around this problem, perform one of the following two steps:
STATUSMicrosoft has confirmed this to be a problem in MASM versions 6.0, 6.0a, and 6.0b for MS-DOS and OS/2. This problem was corrected in MASM version 6.1 for MS-DOS.
MORE INFORMATIONIn code developed for Microsoft Macro Assembler (MASM) version 6.0 or later, an application can create nested structures or use the DUP operator to create arrays of structures. An application can initialize a nested structure or an array of structures. However, an attempt to initialize a structure that contains an array of nested structures fails with the errors listed above. MASM version 6.1 generates the following error message when an application attempts to initialize an array of nested structures:
error A2177: nested structure improperly initializedThe following code example demonstrates this error.
Sample Code; Assemble options needed: none .MODEL small, c inner_struct STRUCT w1 DW ?inner_struct ENDS outer_struct STRUCT s1 inner_struct 2 DUP ({})outer_struct ENDS .DATA tst1 outer_struct {{{1},{2}}} ; This line generates an error message ; tst2 outer_struct {{}} ; This line is allowed END |
Additional reference words: 6.00 6.00a 6.00b buglist6.00 buglist6.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |