Sorting algorithms/Bubble sort: Difference between revisions
Content added Content deleted
m (→{{header|Icon and Unicon}}: Don't use header like this) |
m (→{{header|Icon}}: typo fix) |
||
Line 657: | Line 657: | ||
==={{header|Icon}}=== |
==={{header|Icon}}=== |
||
While bubble sort is a basic algorithm it also illustrates a difference in the way Icon handles types. Built-in |
While bubble sort is a basic algorithm it also illustrates a difference in the way Icon handles types. Built-in |
||
operators for comparing data types make a syntactic distinction between numeric and string types, and sorting |
operators for comparing data types make a syntactic distinction between numeric and string types, and sorting |
||
Line 707: | Line 706: | ||
procedure cmp(a,b) |
procedure cmp(a,b) |
||
return a > b # Imagine a complex |
return a > b # Imagine a complex comparison test here! |
||
end |
end |
||