Jump to content

User:Eriksiers/Permute a string: Difference between revisions

m
VB note
m (added a note)
m (VB note)
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.
 
<lang qbasic>DECLARE SUB Permute (unchanged$, volatile$)
1,150

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.