Anonymous user
Order two numerical lists: Difference between revisions
m
→{{header|REXX}}: changed logic, added comments.
m (→{{header|REXX}}: added/changed comments and whitespace, used a template for the output section.) |
m (→{{header|REXX}}: changed logic, added comments.) |
||
Line 1,393:
/* [↓] compare a list to previous list*/
do j=2 while @.j\==''; p= j - 1 /*P: points to previous value in list.*/
▲ else is= " ≥ " /* " " " " " " " */
say
say right('['@.p"]", 40) is '['@.j"]"
Line 1,405 ⟶ 1,403:
wx= words(x); wy= words(y)
do k=1 for min(wx, wy)
a= word(x, k)
b= word(y, k)
if a<b then return 'true'
else if a>b then return 'false'
end /*k*/
if wx<wy then return 'true' /*handle case of equal (so far). */
return 'false' /* " " " " " " */</lang>
{{out|output|:}}
<pre>
|