Greetings. I'm just learning programming so maybe the thing I ask for makes no sense at all, but I couldn't solve my problem with the SmileBASIC reference so I'm asking here.
I'm trying to print an array from a location higher than zero, to zero (the first item in the array) but I can't seem to get it work.
This is the code I'm using to input strings
c=1 for i=0 to c-1 input v$ if v$=="." then goto @print 'I'm using this as a parameter to end the input arr$[i]=v$ c=c+1 nextAnd this is the part I use to print. If I want to print the array in order, the following works just fine:
@print for i=0 to c-1 print arr$[i] nextBut if I try to print the array in reverse order, like I think it is, I get no output at all. This is the code I use:
@print for i=c-1 to 0 print arr$[i] nextSo the idea I have of printing an array in reverse order is clearly not working, that's why I want to ask here if it's even possible to do it this way, or even at all. The solution I'm thinking of it's to input this in reverse order into another array, and then print the new array which will print in reverse order the strings from the first array. But I wanna know if there is a way easier than this! Thanks in advance.