One command that would be nice is to have a command that will duplicate a character (or perhaps the complete contents of a string), a given number of time.
Quote from: MrTAToad on 2010-Nov-26
One command that would be nice is to have a command that will duplicate a character (or perhaps the complete contents of a string), a given number of time.
// ------------------------------------------------------------- //
// -=# F_STRING$ // Replica per nĀ°volte la lettera passata#=-
// ------------------------------------------------------------- //
FUNCTION F_string$: wnvolte,wcar$
LOCAL writ$,wl
writ$ = ""
FOR wl = 1 TO wnvolte
writ$ = writ$ + wcar$
NEXT
RETURN writ$
ENDFUNCTION // F_string$
Bye bye,
Neurox/Paolo
I actually use :
FUNCTION space$:amount%
LOCAL temp$
temp$=""
WHILE amount%>0
temp$=temp$+" "
DEC amount%
WEND
RETURN temp$
ENDFUNCTION