Algosim documentation: AddMember

AddMember

Adds a member to a structure.

Syntax

Description

If S is a structure, s a valid identifier, and x any object, then AddMember(S, s, x) returns S with a new member named s with value x added at the end of S.

Examples

struct("a": 3, "b": 10)
a: 3
b: 10
AddMember(ans, "c", 394)
a: 3
b: 10
c: 394

See also