Rosetta Code/Rank languages by popularity: Difference between revisions

m
→‎REXX program: changed whitespace, tested input for a blank field.
m (→‎REXX program: fixed closing tag.)
m (→‎REXX program: changed whitespace, tested input for a blank field.)
Line 4,799:
end /*v*/ /* [↑] handle different lang spellings*/
if igAst then do; igAst= pos(' * ',$)==0; if igAst then iterate; end
if pos('RETRIEVED FROM', translate($$u))\==0 then leave /*is this a pseudo End─Of─Data? .*/
$$u = $$; upper $$u
if pos('RETRIEVED FROM',$$u)\==0 then leave /*is this a pseudo End─Of─Data? */
if which=='L' then do
if left($$, 1)\=='*' then iterate /*lang not legitimate?*/
parse upper var $$u '*' $$ "<"; $$= space($$); L.$$= 1
if $$=='' then iterate /*recs*/; L.$$= 1
langs= langs+1 /*bump the number of languages found. */
iterate /*iterates the DO recs loop. */
end /* [↓] pick off the language name. */
if left($$, 1)=='*' then $$= sep || space( substr($$, 2) )
catHeap= catHeap $$ /*append to the catHeap (CATegory) heap*/
end /*recs*/