Anonymous user
Hash join: Difference between revisions
m
→{{header|REXX}}: added/changed whitespace and comments.
m (→{{header|REXX}}: added/changed whitespace and comments.) |
|||
Line 1,399:
=={{header|REXX}}==
<lang rexx>/*REXX
hash.= /*initialize the hash table (array).
do #=1 while S.#\=='';
hash.name=hash.name # /*build a hash table entry
end /*#*/ /* [↑] REXX does the heavy work here. */
#=#-1 /*adjust for the DO loop (#) overage.*/
do j=1 while R.j\=='' /*process a nemesis for a name element.
parse var R.j x nemesis /*extract the name and it's nemesis. */
if hash.x=='' then do;
S.#=
do k=1 for words(hash.x);
end /*k*/
end /*j*/
_='─' /*the character used for
pad=left('',6-2) /*spacing used in
say pad center('age',3) pad center('name',20
say pad center('───',3) pad center('' ,20,_) pad center('' ,30,_)
do n=1 for #; parse var S.n age name nems /*get
if nems=='' then iterate
say pad right(age,3) pad center(name,20) pad nems /*
end /*n*/
/*stick a fork in it, we're all done. */</lang>
'''output''' using the in-code relations (data):
<pre>
|