RosettaCodeData/Task/Associative-array-Merging/SenseTalk/associative-array-merging.s...

14 lines
422 B
Plaintext

set base to {name:"Rocket Skates", price:12.75, color:"yellow"}
set update to {price:15.25, color:"red", year:1974}
put "Base data: " & base
put "Update data: " & update
// replacing as an operator, to generate merged data on the fly:
put "Merged data: " & base replacing properties in update
// replace as a command, to modify base data in place:
replace properties of update in base
put "Base after update: " & base