Please enable JavaScript to view this site.

A-Shell Development History

Language enhancement: The new dot function .ISDEF() can be used to determine whether the specified DYNSTRUCT member exists, i.e. whether the DYNSTRUCT is bound to a structure that contains the specified member. Syntax:

.ISDEF(ds.member)   ! (Simple Indirect)  

.ISDEF(ds.@member$)  ! (Indirect Deferred)

Example:

map1 ds,DYNSTRUCT

map1 field$,s,30   

...

if .ISDEF(ds.foo) then

    ? "ds.foo exists; value = ";ds.foo

endif

...   field$ = "foo"

if .ISDEF(ds.@field$) then

    ? "ds.@";field$;" exists; value = ";ds.@field$

endif

 

See MX_DYNSTRUCT (DYNOP_INFO) for an alternate approach to determining the details of the current finding for a specified DYNSTRUCT.