Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
OLDSTRUCTS│NOOLDSTRUCTS Option
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   OPTION OLDSTRUCTS
 
            OPTION NOOLDSTRUCTS
 
  See also: STRUCT, UNION, Dot Operator (.), MASM 5.1 Compatibility
 
  Description:
 
     The OLDSTRUCTS option enables MASM 5.1-compatible scoping of
     structure members. This option causes all structure members to
     have the same scope as the structure name and prevents a label and
     a member name from having the same name. This option also causes
     the dot operator to act exactly like a plus.
 
     NOOLDSTRUCTS is the default. The OLDSTRUCTS option is enabled with
     the M510 option.With the default, OPTION NOOLDSTRUCTS, label and struc-
     ture field names may have the same name. With OPTION OLDSTRUCTS (the
     MASM 5.1 default), labels and structure fields cannot have the same name.
 
     With OPTION OLDSTRUCTS or OPTION M510 you can use plus operator (+) in
     structure field references. Labels and structure field names cannot have1
     the same name with OPTION OLDSTRUCTS.
 
     By default, each reference to structure member names must use the dot
     operator (.) to separate the structure variable name from the field name.
     You cannot use the dot operator as the plus operator (+) or vice versa.
     To convert your code so that it does not need OPTION OLDSTRUCTS, qualify
     all structure field references. and change all uses of the dot operator
     occurring outside of structure references to use the plus operator.
 
     If you remove OPTION OLDSTRUCTS from your code, the assembler generates
     errors for all lines requiring change. Using the dot operator in any
     context other than for a structure field results in error A2166. Unqual-
     ified structure references result in error A2006.
                                    -♦-