Algosim documentation: IndexOfName

IndexOfName

Returns the index in a structure of the member with a given name.

Syntax

Description

If S is a structure and s a string, then IndexOfName(S, s) returns the index of the member named s in S, if present. If S has no member named s, then 0 is returned.

Examples

date()
year: 2020
month: August
day: 12
IndexOfName(date(), "day")
3

See also