STRUC            Define Structure Type                         MASM Directive
 
  name      STRUC
  fieldDefinitions
  name      ENDS
 
    Initiates the definition of a structure type.
 
       Notes:     The structure may have any number of fields.  Each field
                  definition must be of the following form:
 
                       [name]   DB | DW | DD | DQ | DT   initialValue,,,
 
                  The optional parameter name specifies the name of the
                  field. The DB, DW, DD, DQ, or DT specifies the size of
                  the field.  InitialValue assigns a default value to be
                  used if no value is included when the structure is
                  declared. See DB, DW, DD, DQ, and DT for a more
                  comprehensive discussion of how to use these directives.
 
                  The STRUC directive by itself does not create data. It
                  merely creates a data type. To create data of this type,
                  use the syntax:
 
                       [name]      structureName      <[initialValue,,,]>
 
                  where name is the name of a variable and structureName
                  is the name of a structure type previously defined with
                  the STRUC directive. One initialValue may be declared
                  for each field in the structure, using commas to
                  separate the initial values for each field. For example,
                  <,,3> will initialize the 3rd field of a structure.
 
                  Structure definitions can contain only comments and
                  field definitions, therefore nested structures are not
                  allowed.

Seealso:



This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster