class Name [(Parameter, ...)] [% Inherit] [public Library] [Alignment] is Field, ... type Name [% Inherit] [public Library] [Alignment] is Field, ...
Structures can be declared in a Class or on a Type declaration within a Class. Generic parameters for a structure can only be declared on a Class declaration; not by using a Type declaration.
Name is the name of a structure.
Parameter is a list of Generic parameters.
Inherit is the name of a Class defining a structure to inherit.
Library is used to build a structure into a Library.
Alignment is a power of 2 in decimal or an integer type name: byte, parcel, word, cell
Field has one of these forms:
[+|-] [@|*] Name [(Range)] [= Value] [Type] :A data field; uses storage.
[+|-] Name |= Static :A micro field; uses no storage.
[+|-] Name [(Item, ...)] => Macro :A macro declaration.
Where Range is: { [Low to] High, Enumeration }
Type is a variable type or a list of types on a Variant Pointer.
An inherited Class needs to declare another structure. Its fields will be included in the structure and its procedures are inheited as well. Parameters to inherited procedures can take take values with either the inherited structure type or the combined structure type.
The alignment clause specifies how the structure is aligned in memory. A Cell alignment will start the structure on an 8 byte memory address. If no alignment is designated the alignment is determined using the widest field in th structure. If the designated alignement is smaller than the widest field then some fields may be unaligned. Usually an unaligned structure will be designated as a byte.