ⓘ 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: flattenStruct

flattenStruct(str) flattens the structure str, i.e. incorporates the members of the substructures into the root of str.

Example:

createStruct("date", date(0), "time", time(0))

date:year: 2010
date:month: 6
date:day: 23
date:weekOfYear: 25
date:dayOfYear: 174
date:dayOfWeek: 3
time:hour: 15
time:minute: 21
time:second: 45
time:millisecond: 560

flattenStruct(ans)

year: 2010
month: 6
day: 23
weekOfYear: 25
dayOfYear: 174
dayOfWeek: 3
hour: 15
minute: 21
second: 55
millisecond: 131