RosettaCodeData/Task/Associative-array-Iteration/Aime/associative-array-iteration...

13 lines
298 B
Plaintext

record r;
text s;
r_put(r, "A", 33); # an integer value
r_put(r, "C", 2.5); # a real value
r_put(r, "B", "associative"); # a string value
if (r_first(r, s)) {
do {
o_form("key ~, value ~ (~)\n", s, r[s], r_type(r, s));
} while (rsk_greater(r, s, s));
}