Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Development Topics > Dynamic Structures

Declare a Dynstruct Variable

Scroll Prev Top Next More

To enable the structure to be defined at runtime, an empty dynamic structure variable must be declared at compile time, using the type DYNSTRUCT:

MAP1 ds, dynstruct   ! scalar dynamic structure

MAP1 DS2, DYNSTRUCT  ! another

 

As with other built-in types, the type name is case insensitive.

Dynstructs are similar to dynamic X variables (X,0), except that they may be associated with—i.e. bound to—a structure definition. Until then, the structure is considered "uninitialized". Once the dynstruct variable has been bound to a defined structure, it behaves like a fixed-length instance of that structure. See Reference / Usage.