Out of range error during arrays managing
Root / Programming Questions / [.]
Stefano_LassandroCreated:
OPTION STRICT DIM A$[64] VAR I A$[0]="abcdefgh" PRINT (A$[I])[2] 'Error lineI thought that this was going to output "c", but looks like there's an out of range error on the PRINT line. I thought il could work because this works:
A$="abcdefgh" PRINT A$[2] 'Output: "c"So, I've three questions: 1) Is MID$ the fastest (working with string arrays) way? 2) In the cases where I can't use MID$, what should I do? 3) Is there a way to "fix" this code? Thanks! And sorry for my bad english : )
But if I=0 and in the position 0 of the A$ array there is a string, why the first one is not working? It's strange...
Your code works for me in both the 3DS and Switch versions. Is this really all of the code? Did you make a typo somewhere?Oh, actually separated from the rest of the code works! It's strange becouse it's not in any loop so I doesn't change before PRINT anyway. Dunno why