Structure Definitions

Structure Definitions

Structure definitions must also be contained within a data segment. They are used to define a type which aggregates or contains other native or user-defined types. A structure definition is defined using the struct and ends keywords with the following syntax:

 TypeName struct
   x byte
   y byte
 TypeName ends

Structure definitions allow you to manage related data in a single combined type. They can be as simple or complex as the needs of your program dictate. The following is an example of a fairly complex structure:

 MyPoint struct
   x byte
   y byte
 MyPoint ends
 ComplexStrut struct
   value1 big            // using a type alias
   value2 sdword
   buffer byte[]         // array of byte
   blen word
   extrastuff MyPoint[]  // array of structs
   pt_1 MyPoint          // struct contains struct instances
   pt_2 MyPoint
 ComplexStruct ends

Generated by  doxygen 1.6.2