Range consolidation: Difference between revisions

m
→‎{{header|REXX}}: simplified code.
m (→‎{{header|REXX}}: re-instated a missing line of code.)
m (→‎{{header|REXX}}: simplified code.)
Line 1,211:
y= space(y, 0) /*elide superfluous blanks in the sets.*/
do k=1 while y\=='' & y\=='[]' /*process ranges while range not blank.*/
ify= leftstrip(y,1)== ',L', ",") then y= substr(y,2) /*elide commas between sets of ranges. */
parse var y '[' L "," H ']' y /*extract the "low" and "high" values.*/
if H<L then parse value L H with H L /*order " " " " " */