Login
Back to forumSee the full topicGo to last reply

Posted By

Csabo
on 2020-02-16
10:00:30
 Re: Redimension Arrays (Basic)

Yeah, just want to chime in and reiterate what's been said; this can't be done in BASIC 3.5.

One workaround would be to issue a CLR in your program, this would let you re-dimension your array, but it would wipe out all other variables as well.

Manually "killing" the array (which is outside of BASIC's capabilities) would be something like this:
0 DIMA$(25)
2 DIMA$(20)
(fails with error)

0 DIMA$(25)
1 POKEPEEK(46)*256+PEEK(45),255
2 DIMA$(20)
This runs, but the memory allocated by the first array is "lost"... And to be honest might have other side effects as well.



Back to top


Copyright © Plus/4 World Team, 2001-2024