Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New game: Earthraid
#34
britlion Wrote:I don't think global variables are allocated on the heap.
True. Global var are not allocated on the heap. They are "static".
The code above is static and the heap is not affected.
What slenkar wants it a Dynamic Array (not supported yet). Al DIM sentences are just declarations and reserve the memory in compile time, except for local variables (e.g. within a function), which are temporary allocated into the stack.
DIM sentences are *not* executed.

Sinclair BASIC does executes them. In the future, ZX BASIC will allow this to. So you can REDIM arrays on runtime. These are Dynamic Arrays and they will go into the heap.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)