Best shuffle: Difference between revisions
m
BaCon and BBC BASIC moved to the BASIC section.
No edit summary |
m (BaCon and BBC BASIC moved to the BASIC section.) |
||
Line 491:
The output might change if the <tt>for (c in set)</tt> loop iterates the array in a different order.
=={{header|BaCon}}==▼
▲==={{header|BaCon}}===
<syntaxhighlight lang="bacon">DECLARE case$[] = { "tree", "abracadabra", "seesaw", "elk", "grrrrrr", "up", "a" }
Line 520 ⟶ 522:
a:1
</pre>
▲=={{header|BBC BASIC}}==
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> a$ = "abracadabra" : b$ = FNshuffle(a$) : PRINT a$ " -> " b$ FNsame(a$,b$)
Line 552 ⟶ 555:
NEXT
= " (" + STR$(n%) + ")"</syntaxhighlight>
<pre>
abracadabra -> daaracababr (0)
|