# .ISDEF()

> [HTML Version](isdef.htm)

_Added February 2022_

**.ISDEF(ds.member)**

**.ISDEF(ds.@member\$)**

.ISDEF() returns true (-1) or false (0) depending on whether the specified [DYNSTRUCT](declare_a_dynstruct.md) member exists—i.e., whether the DYNSTRUCT is bound to a structure that contains the specified member.

In both variations, _ds_ should be either an mapped instance of a structure, or the structure definition name from the defstruct. The difference between the two variations is that in the first case, _member_ must be an actual reference to a member of the specified structure, whereas in the second case _member\$_ should be a string variable whose value matches a member of the structure. See [Dynamic Structure Reference / Usage](referenceusagedynamic.md) for more details.

**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](dynamicstructures.md)

•	[MX\_DYNSTRUCT](mx_dynstruct.md) (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

