Sort an integer array: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
No edit summary |
||
Line 1,207: | Line 1,207: | ||
[-42, 2, 2, 5, 78, 578] |
[-42, 2, 2, 5, 78, 578] |
||
[578, 78, 5, 2, 2, -42] |
[578, 78, 5, 2, 2, -42] |
||
</pre> |
|||
=={{header|FutureBasic}}== |
|||
<syntaxhighlight lang="futurebasic"> |
|||
window 1, @"Sort an integer array" |
|||
void local fn DoIt |
|||
CFArrayRef array = @[@13,@71,@42,@8,@5,@27] |
|||
array = fn ArraySortedArrayUsingSelector( array, @"compare:" ) |
|||
print fn ArrayComponentsJoinedByString( array, @", " ) |
|||
end fn |
|||
fn DoIt |
|||
HandleEvents |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
5, 8, 13, 27, 42, 71 |
|||
</pre> |
</pre> |
||