Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug when redimensioning multi-dimension arrays?
#34
It's an implementation detail and not accessible from within BASIC code, but the array descriptor data structure is thus:
Code: (Select All)
a[0]: pointer to data

a[1]: reserved
a[2]: Flags (1 = init, 2 = static, 4 = cmem)
a[3]: reserved

a[4]: lower bound            <- rightmost dimension
a[5]: number of elements
a[6]: Block size
a[7]: reserved

a[8]: lower bound
a[9]: number of elements
a[10]: Block size
a[11]: reserved

a[12]: lower bound           <- leftmost dimension
a[13]: number of elements
a[14]: 1
a[15]: reserved

a[last]: _MEM lock
Where the central group of 4 entries repeats for each dimension. Block size is a stride value that takes into account the dimensions to the left. Reserved denotes fields that as far as I can tell are never used.
Reply


Messages In This Thread
RE: Bug when redimensioning multi-dimension arrays? - by luke - 06-21-2024, 09:35 AM



Users browsing this thread: 2 Guest(s)