Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug when redimensioning multi-dimension arrays?
#28
(06-20-2024, 04:00 PM)SMcNeill Wrote: The problem with adding it into the source is simple:  How do you account for all possible variations of array that a user might have?

DIM x(0 to 1, 1 to 4)
REDIM x(1 to 3, 4 to 17)    <--- Now what the heck does the source look like for this??

DIM x(-1 to 3, 2 to 14, 1 to 27, 11, apple_number, cheestos, and_frogs)    <-- and what would the source look like to handle this when its redimmed?
Sigh. 90% of programming seems to be dealing with the edge cases. Your explanation is really clear.

One question I have: how does QB64 store the LBOUNDS and UBOUNDS for an array? Could you point me to the data structure in source?

It seems that QB wants to keep all of the data in the array and just change the indexes that point to the data. Is that true? I'm not sure I understand the reasoning behind that, but I'd love to know.
Reply


Messages In This Thread
RE: Bug when redimensioning multi-dimension arrays? - by 12centuries - 06-20-2024, 09:16 PM



Users browsing this thread: 6 Guest(s)