HasMember
Tests if a structure has a member with a given name.
Syntax
-
HasMember(S, s)
-
S
is a structure -
s
is a string
-
Description
If S
is a structure and s
a string, then HasMember(S, s)
returns true
iff S
has a member named s
.
Examples
date()
year: 2020 month: August day: 12
HasMember(date(), "year")
true
HasMember(date(), "NargleCount")
false