Hash from two arrays: Difference between revisions
Content added Content deleted
(Added Wren) |
m (→{{header|REXX}}: simplified the program.) |
||
Line 1,726: | Line 1,726: | ||
hash.='───(not defined)───' /* [↑] blanks added to humorous keys */ |
hash.='───(not defined)───' /* [↑] blanks added to humorous keys */ |
||
/* just because it looks prettier.*/ |
/* just because it looks prettier.*/ |
||
do k=1 while key.k\=='' |
do k=1 while key.k\=='' |
||
call hash vals,key.k |
call hash vals,key.k /*hash the keys to the values. */ |
||
end /*k*/ |
end /*k*/ |
||
parse arg query . /*obtain what was specified on the C.L.*/ |
parse arg query . /*obtain what was specified on the C.L.*/ |
||
if query=='' then |
if query\=='' then say 'key:' left(query,40) "value:" hash.query |
||
say 'key:' left(query,40) "value:" hash.query /*display some stuff to the terminal. */ |
|||
exit /*stick a fork in it, we're all done. */ |
exit /*stick a fork in it, we're all done. */ |
||
/*──────────────────────────────────────────────────────────────────────────────────────*/ |
/*──────────────────────────────────────────────────────────────────────────────────────*/ |