gmplStructureStatement
- Mark Juras
Owned by Mark Juras
Structure Statement Summary
Structure is a terminal or nonterminal, declaration statement that occurs within Library statements and Class statements. Note that in description files authored from IDL-- i.e., external COM components -- there is also a Union statement (all members occupy the same location). In so far is gmBasic is concerned unions are treated in the same manner as structures. This statement has no refactoring or declaration flags associated with it. The terminal form of the Structure statement is used to deal with the forward reference problems in library declarations. It is often the case that a member component of a type-defining component can have references to other types that have not yet been defined. Rather than trying to sort the type-defining declarations into a "reference" order, gmBasic, when it authors the declarations, places a set of terminal statements for all global type-defining components in the front of the library declaration with only the Id attribute specified. The later statements with the same Id then specify the remaining attributes and substatements. The attributes of the Structure statement are as follows:Attribute | Description |
Id | This attribute is the identifier of the structure. It must be unique with the scope of the library or class containing the structure. The identifier is not case-sensitive. This attribute must be specified on all declarations, be they terminal or nonterminal. |
The declarations within the Structure statement are as follows:
Substatement | Description |
Member | Defines a member field within the structure |
The attributes of the Member substatement are as follows:
Attribute | Description |
Id | This attribute is the identifier of the member field. It must be unique with the scope of the containing the structure |
Type | This attribute is a Type attribute as discussed on the Declaration page. It specifies the type of the field. |
The script errors associated with the Structure and Member statements are as follows:
Error | Description |
1043 | Structure command missing required id attribute. |
1044 | Unable to store structure vector: %1d |
1045 | Encountered following when expecting 'member': %1d |
1046 | Member command missing required id attribute. |
1047 | Member command missing required type attribute. |
Table of Contents