(09-18-2023, 06:35 AM)PhilOfPerth Wrote: Should it be (or is it already) mentioned in the Wiki, that Dim var(num of elements) allows element 0, as well as the number of elements dimmed ?
So Dim var(10) actually allocates 11 element positions, not 10. (Or does it)?
This may become significant for memory usage with multi-dimensional arrays:
Dim var(10, 1000) would occupy space for about 11 * 1001 units (11011), not 10000 as I would expect.
It's mentioned already in the first two lines in the Wiki description:
https://qb64phoenix.com/qb64wiki/index.p...escription
Zero is the default for lowest index, to override use OPTION BASE 1 before DIMing your arrays or hard index your arrays using the DIM xxx(lb TO ub) syntax (see Wiki Example 4).
GuiTools, Blankers & other Projects:
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23
https://qb64phoenix.com/forum/forumdisplay.php?fid=32
Libraries & useful Functions:
https://qb64phoenix.com/forum/forumdisplay.php?fid=23