Algosim documentation: HasMember

HasMember

Tests if a structure has a member with a given name.

Syntax

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

See also