AddMember
Adds a member to a structure.
Syntax
-
AddMember(S, s, x)
-
S
is a structure -
s
is a string -
x
is any object
-
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