Sorting algorithms/Strand sort: Difference between revisions

m
→‎{{header|REXX}}: removed STYLE from the PRE html tag.
(solved for maxscript)
m (→‎{{header|REXX}}: removed STYLE from the PRE html tag.)
Line 1,401:
end /*forever*/
return space(p a.1 a.2)</lang>
'''output''' when using the input of: &nbsp; <tt> 25 -9 30 20.5117 1e7 </tt>:
<pre>
<pre style="overflow:scroll">
================================unsorted list==================================
20.5117 1e7 12 -6 13 26 30 27 -5 9 -8 14 9 21 3 13 17 6 23 22 14 3 9 1 30 -4 28
Line 1,409:
-8 -6 -5 -4 1 3 3 6 9 9 9 12 13 13 14 14 17 20.5117 21 22 23 26 27 28 30 30 1e7
</pre>
The REXX program can also sort words as well as numbers. <br>
<br><br>'''output''' when using the input of: &nbsp; <tt> 24 -9 100 66 66 8.8 carp Carp </tt>:
<pre>
<pre style="overflow:scroll">
====================================unsorted array====================================
66 66 8.8 carp Carp 49 50 8 82 59 65 -7 30 18 25 79 6 18 35 58 51 90 79 2 3 -5 72 29 5
Line 1,418:
-7 -5 2 3 5 6 8 8.8 18 18 25 29 30 35 49 50 51 58 59 65 66 66 72 79 79 82 90 Carp carp
</pre>
Note that an &nbsp; ASCII &nbsp; computer will sort words differently than an &nbsp; EBCDIC &nbsp; machine. <br>
<br>The order of sorting on an EBCDIC&nbsp; ASCII &nbsp; machine is: &nbsp; <tt> lowerCasenumbers, upperCase, numberslowerCase </tt>
<br>
<br>The order of sorting on an ASCIIEBCDIC machine is: &nbsp; <tt> numberslowerCase, upperCase, lowerCasenumbers </tt>
<br>The order of sorting on an EBCDIC machine is: <tt> lowerCase, upperCase, numbers </tt>
<br><br>