RenameMember
Renames a member in a structure.
Syntax
-
RenameMember(S, x, y)
-
S
is a structure -
x
andy
are strings
-
Description
If S
is a structure, x
the name of a member in S
, and y
a valid identifier, then RenameMember(S, x, y)
returns S
with the member named x
renamed to y
.
Examples
struct("a": 3, "b": 10)
a: 3 b: 10
RenameMember(ans, "b", "beta")
a: 3 beta: 10