Error Array
BlitzMax Forums/BlitzMax Beginners Area/Error Array
| ||
Hi, this does not work for me here, I'm doing wrong? I returned an error. Local numeros:Int[10] For n:Int = 0 To 10 numeros[n] = n Print numeros[n] Next |
| ||
Local numeros:Int[11] For n:Int = 0 To 10 numeros[n] = n Print numeros[n] Next 0 to 10 = 11 elements (you've only defined 10: i.e. 0 to 9) |
| ||
Ok, Thanks You. :)Local numeros:Int[10] For n:Int = 0 Until 10 numeros[n] = n Print numeros[n] Next |
| ||
If you are using 0-based indexing, "Until" seems to make more sense. This way you can do ... Until array.length... as opposed to ... To array.length - 1 |
| ||
Hi, thanks for the help, my question is for serving the arryas method, called Dimensions (). |