12 lines
449 B
Text
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
|