Defines a Structure-TypeName that represents an aggregate data type containing one or more fields.
Syntax
Structure-Name STRUCT FieldDeclaration . . . Structure-Name ENDS
Where FieldDeclaration has the following form:
[FieldName] Allocation-TypeName InitialValue [, InitialValue ...]Remarks
The obsolete spelling for the STRUCT directive is STRUC.
The syntax for the FieldDeclaration is that of a normal data allocation statement. See the section on Data Allocation for a full description of this syntax.
The various parts of the FieldDeclaration are described as follows:
FieldName
Define a Structure-TypeName called Numbers:
Numbers STRUCT
One DB 0
Two WORD 0
BYTE 3
Four DWORD ?
Numbers ENDS
Allocate a structure variable called Values using the Numbers Structure-TypeName, overriding the One, Two, and Four Structure-FieldName entries with explicit values, and the third (unnamed) entry is initialized with the default InitialValue inherited from the FieldDeclaration:
Values Numbers <1, 2, , 4>