User:Eriksiers/Permute a string: Difference between revisions
m
updated lang tag
m (added a note) |
m (updated lang tag) |
||
(One intermediate revision by the same user not shown) | |||
Line 3:
Note that this is heavily recursive, adding a level of recursion for each character in the string. Long strings will run out of stack space pretty fast.
Note also that the sub works almost unchanged in [[Visual Basic]] (if you change the output method, e.g. <code>'''PRINT'''</code>-><code>'''PRINT #'''</code>) and [[PowerBASIC]]. Probably other [[BASIC]]s too, but I haven't checked.
<
'Permute() must be called with an empty string as the first arg,
Line 22:
END IF
END SUB
</syntaxhighlight>
|