Login
Back to forumSee the full topicGo to last reply

Posted By

Csabo
on 2019-05-07
18:56:27
 Re: Maximum Dimension of arrays in Basic

There's no limit, except the memory. The smallest thing you can hold in an array is an integer, which takes up 2 bytes.

RUN this as an example
0 DIMA%(30000):FORI=0TO29999:A%(I)=I:NEXTI
... and it will happily allocate 60000 bytes for you, filling up pretty much all the memory.

Regular numbers take up 5 bytes, so at most you could dimension a single array for 60671/5 ~= 12K elements. That's pretty much all there is to it, I think.



Back to top


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon