RosettaCodeData/Task/Hash-from-two-arrays/Icon/hash-from-two-arrays.icon
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

12 lines
449 B
Text

link ximage # to format the structure
procedure main(arglist) #: demonstrate hash from 2 lists
local keylist
if *arglist = 0 then arglist := [1,2,3,4] # ensure there's a list
every put(keylist := [], "key-" || !arglist) # make keys for each entry
every (T := table())[keylist[ i := 1 to *keylist ]] := arglist[i] # create the hash table
write(ximage(T)) # show result
end