Please enable JavaScript to view this site.

A-Shell Reference

Added October 2018

The layout of ST_FLDDEF, defined in ASHINC:DYNSTRUCT.DEF, is:

define MAX_ARY_DIMS = 4         ! max # array dimensions 

deftype T_DYN_NAME  = S,64      ! type,size for DYNSTRUCT struct and field names

deftype T_DEFTYP    = S,64      ! type used to store name a DEFTYPE name

 

defstruct ST_FLDDEF                 ! 

    map2 name,T_DYN_NAME            ! name of struct or field

    map2 vartyp,b,2                 ! see VARTYP_xxx

    map2 varsiz,b,4                 ! size of field (or element in array)

    map2 pos,b,4                    ! offset from base of structure, base 0

    map2 subs,b,2                   ! # subscripts (0 for scalar)

    map2 subext(MAX_ARY_DIMS),b,4   ! # of elements in up to 4 dimensions

    map2 deftyp,T_DEFTYP            ! name of deftype (if applic.)

endstruct

 

The deftyp member will contain the name of the DEFTYPE used to define the member type and size, if it didn’t use a built-in type.  The idea behind including it is to allow DEFTYPEs to be used as data dictionary data types, allowing you to write generic code to handle the special formatting or other semantic attributes of members that aren’t otherwise knowable from the simple types.