Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Development Topics > Dynamic Structures

Bind the Dynstruct to a Variable

Scroll Prev Top Next More

Updated December 2024

The binding operation associates a dynamic structure definition with a DYNSTRUCT variable, accomplished via one of the following methods.

map1 ds, DYNSTRUCT            ! sample dynamic struct  (used below)

map1 stvar, ST_SOME_STRUCT    ! sample defstruct          "   "

map1 bar, ST_ANOTHER_STRUCT   ! another sample defstruct  "   "

 

Explicit binding via MX_DYNSTRUCT:

xcall MIAMEX, MX_DYNSTRUCT, DYNOP_BIND, status, dsname$, ds

Explicit binding via .BINDSTRUCT:

.BINDSTRUCT ds, stvar

Implicit DYNSTRUCT by passing an instance of a defined structure to a function which receives it as a DYNSTRUCT:

call Fn'Dive(ds=bar)   ! ST_FOO will be embedded (because of how fn'foo receives it)

...

function Fn'Dive(ds as DYNSTRUCT)

 

See also