Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Hash-from-two-arrays/OoRexx/hash-from-two-arrays.rexx
Normal file
13
Task/Hash-from-two-arrays/OoRexx/hash-from-two-arrays.rexx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
array1 = .array~of("Rick", "Mike", "David")
|
||||
array2 = .array~of("555-9862", "555-5309", "555-6666")
|
||||
|
||||
-- if the index items are constrained to string objects, this can
|
||||
-- be a directory too.
|
||||
hash = .table~new
|
||||
|
||||
loop i = 1 to array1~size
|
||||
hash[array1[i]] = array2[i]
|
||||
end
|
||||
Say 'Enter a name'
|
||||
Parse Pull name
|
||||
Say name '->' hash[name]
|
||||
Loading…
Add table
Add a link
Reference in a new issue