Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REDIM, TYPE, and STRING Woes
#3
I've run into trouble using UDT's when I assume after a ReDim _Preserve that the new values are 0 or "" for numbers or strings.

Supposedly the numbers and fixed strings were fixed according to Luke if I recall but variable length strings had to initilized to "" otherwise they pick up garbage from the string pointers to uncleared meomory, something like that.

@TerryRichie could it be possible you were assuming new variable length strings were "" after a ReDim _Preserve ?

Perhaps also, whatever was fixed back when Luke checked it became unfixed with all the updates made since, like with assumed 0 of new integers created with ReDim _preserve?

I will write some test code...
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
REDIM, TYPE, and STRING Woes - by TerryRitchie - 04-12-2023, 05:57 AM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 10:24 AM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 03:50 PM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 04:34 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 04:15 PM
RE: REDIM, TYPE, and STRING Woes - by mnrvovrfc - 04-12-2023, 04:33 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 04:41 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 05:59 PM
RE: REDIM, TYPE, and STRING Woes - by bplus - 04-12-2023, 06:09 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 10:14 PM
RE: REDIM, TYPE, and STRING Woes - by SMcNeill - 04-12-2023, 10:20 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-12-2023, 10:33 PM
RE: REDIM, TYPE, and STRING Woes - by Kernelpanic - 04-12-2023, 11:48 PM
RE: REDIM, TYPE, and STRING Woes - by DSMan195276 - 04-13-2023, 05:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QB64PE Excel-type spreadsheet supporting formulas and QB64PE macros? madscijr 33 1,532 01-30-2026, 12:28 AM
Last Post: madscijr
  Variable length type declarations dano 5 689 08-06-2025, 09:53 PM
Last Post: dano
  Determining if variable or static string is passed to a Sub dano 9 1,226 06-20-2025, 06:31 PM
Last Post: CookieOscar
  Most efficient way to build a big variable length string? mdijkens 9 1,894 01-17-2025, 11:36 PM
Last Post: ahenry3068
Question REDIM takes more resources than DIM? bplus 34 5,940 07-23-2024, 01:04 PM
Last Post: luke

Forum Jump:


Users browsing this thread: 1 Guest(s)