Another minor issue is that you can access one less element with a fixed size integer than when you do 0-based indexing. So for u8 you can only access 255 elements instead of 256 for instance.
Another minor issue is that you can access one less element with a fixed size integer than when you do 0-based indexing. So for u8 you can only access 255 elements instead of 256 for instance.
I have seen some difficult to debug issues caused by this when I used to work on game scripts.
Here are some examples: http://www.lua.org/pil/2.5.html and http://www.lua.org/pil/11.1.html
The sign of the index can be determined without a comparison, usually simultaneously with one of the previous operations.
Packed Array[0..255] of Char
See https://www.pascal-programming.info/lesson10.phphttp://docwiki.embarcadero.com/RADStudio/Sydney/en/Structure...
Examples:
- var MyArray: array [1..100] of Char;
- packed array[Boolean, 1..10, TShoeSize] of Integer;
Dynamic arrays are indexed from zero.