Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REDIM takes more resources than DIM?
#15
(07-17-2024, 01:36 PM)luke Wrote:
(07-17-2024, 09:16 AM)SMcNeill Wrote: May also be an issue with having to reset array values to 0.

TYPE foo
   x AS STRING 
   y AS LONG
END TYPE

REDIM whatever(1000) AS foo

I seem to remember that the above doesn't always initialize arrays to 0, so you may need to do so manually for that, leading to extra run time and such.
This was a bug that will be fixed in the next release.

I seem to recall it being fixed once at least for number in UDT's but varaible length strings messed things up.

@Luke didn't you once say, I forget which forum, it doesn't matter if DIM everything or REDIM everything.
Because from that I experimented with REDIM for everything, no problems! (until the extra 2 characters became tiresome and REDIM looked odd for plain variables).
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
REDIM takes more resources than DIM? - by bplus - 07-17-2024, 12:21 AM
RE: REDIM takes more resources than DIM? - by bplus - 07-17-2024, 02:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preserving multi-dim arrays Pete 5 419 12-19-2025, 03:17 PM
Last Post: Dimster
  packaging resources tool TempodiBasic 6 587 09-22-2025, 11:16 PM
Last Post: TempodiBasic
  DIM AT -- feature request Jack 2 722 08-15-2023, 12:15 AM
Last Post: grymmjack
  REDIM, TYPE, and STRING Woes TerryRitchie 16 3,184 04-13-2023, 05:17 AM
Last Post: DSMan195276
  suggestion: initialize array values within the DIM statement bobalooie 19 3,388 12-22-2022, 06:46 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)