28 lines
510 B
Plaintext
28 lines
510 B
Plaintext
DECLARE base$, update$, merge$ ASSOC STRING
|
|
|
|
base$("name") = "Rocket Skates"
|
|
base$("price") = "12.75"
|
|
base$("color") = "yellow"
|
|
|
|
PRINT "Base array"
|
|
FOR x$ IN OBTAIN$(base$)
|
|
PRINT x$, " : ", base$(x$)
|
|
NEXT
|
|
|
|
update$("price") = "15.25"
|
|
update$("color") = "red"
|
|
update$("year") = "1974"
|
|
|
|
PRINT NL$, "Update array"
|
|
FOR x$ IN OBTAIN$(update$)
|
|
PRINT x$, " : ", update$(x$)
|
|
NEXT
|
|
|
|
merge$() = base$()
|
|
merge$() = update$()
|
|
|
|
PRINT NL$, "Merged array"
|
|
FOR x$ IN OBTAIN$(merge$)
|
|
PRINT x$, " : ", merge$(x$)
|
|
NEXT
|