Decorate-sort-undecorate idiom: Difference between revisions
m
→{{header|FreeBASIC}}
(Added FreeBasic) |
|||
Line 156:
FreeBASIC doesn't normally print string lists in "quoted" form though I've added the quotes here to be consistent with the other solutions.
<syntaxhighlight lang="vb">Type map
End Type
Line 166:
min = i
For j = i + 1 To ub
If array(1,j).
Next j
Swap array(min,1).
Swap array(1,min).
Next i
End Sub
Line 179:
' Decorate
For p = lb To ub
e(p,1).
e(1,p).
Next
Line 189:
Print "[";
For p = lb To ub
Print !"\"" & e(p,1).
Next
Print Chr(8) & Chr(8) & "]"
|