.ISDEF

Added February 2022

.ISDEF(ds.member)

.ISDEF(ds.@member$)

.ISDEF() returns true (-1) or false (0) depending on whether the specified DYNSTRUCT member (ds.member or ds.@member) exists—i.e., whether the DYNSTRUCT is bound to a structure that contains the specified member.

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 Also

•   Dynamic Structures

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

History

2022 February, A-Shell 6.5.1711:  Function added to A-Shell