Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Hash-from-two-arrays/Icon/hash-from-two-arrays.icon
Normal file
12
Task/Hash-from-two-arrays/Icon/hash-from-two-arrays.icon
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue