I needed a function to generate a string with a variable number of spaces.
Dav made such a function via a FOR … NEXT loop. See https://nitisara.ru/forum/viewtopic.php?t=1165
I made a recursive method:
DEF spaces$(n) ' by Dutchman 2025
' return string with n spaces
IF n<1 THEN RETURN ""
IF n>1 THEN Spaces$=Spaces$(n-1)&" " ELSE Spaces$=" "
END DEF
FOR i=0 TO 8
PRINT i&spaces$(i);
NEXT i
Last edited by Dutchman on Tue Jun 10, 2025 9:05 am, edited 1 time in total.