Extending Structures

Structures may be extended as shown in the following example:

Y  STRUCT [

           A;

           B;

  ];      { structure 1, named Y }

X:Y  STRUCT [

             C;

             D;

     ];   { structure 2, named X extends Y }

 

    A  =  X();  {  variable A now holds a 4 element array, where the elements of the array will be in the order A, B, C, D }

 

Structures can also be compound data structures, containing other structures as well as more basic data types:

Z  STRUCT [

           A  STRUCT [

                      Q;

                      R;

             ];

           B;

           C  STRUCT [

                      S;

             ];

    ];