ⓘ This web page is about the old AlgoSim 2 software. Perhaps you are looking for the new Algosim 3 application?
AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: structRenameMember

structRenameMember(str, OldName, NewName) renames the member OldName to NewName inside the structure str. str is a string containing the identifier of a structure. This function alters the structure, so you can think of the first parameter as being the structure str "passed by reference".

Example:

a ≔ createStruct("firstName", "Andreas", "lastName", "Rejbrand", "yearOfBirth", 1987, "IQ", ∞)

firstName: Andreas
lastName: Rejbrand
yearOfBirth: 1987
IQ: ∞

structRenameMember("a", "IQ", "wisdom")

a

firstName: Andreas
lastName: Rejbrand
yearOfBirth: 1987
wisdom: ∞