Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Most efficient way to build a big variable length string?
#10
(01-17-2025, 05:21 PM)bplus Wrote:
(01-17-2025, 01:22 PM)ahenry3068 Wrote: Why do you need to do it this way. 

    A more efficient way to do this would be as an Array of shorter strings.      You could keep the same information there I think just as easily.    Then if you need to remove or alter parts in the middle you don't have to move the entire block.

If it needs to go back into a file in one piece thats pretty easily done with an array when you write it out to the file.

for @ahenry3068
You can't use arrays in UDT's in QB64, that's a BIG obstacle when trying to stucture your program.

Neither can you pass arrays from Functions in QB64 but a String is a piece of cake for both UDT's and Function returns.

I am giving this Topic 5 stars!
     If I was doing this I wouldn't put the array in a UDT.    I would probably do an array of 256 character length strings and write a set of subs/funcs to refer to that array as a single virtual string.     Then when writing them out to file I would just iterate through the array when writing out the data.
Reply


Messages In This Thread
RE: Most efficient way to build a big variable length string? - by ahenry3068 - 01-17-2025, 11:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  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,222 06-20-2025, 06:31 PM
Last Post: CookieOscar
  Big problem for me. MystikShadows 11 1,971 01-16-2025, 05:11 AM
Last Post: JRace
  Huge array of variable length strings mdijkens 9 1,831 10-17-2024, 02:01 PM
Last Post: mdijkens
  REDIM, TYPE, and STRING Woes TerryRitchie 16 3,146 04-13-2023, 05:17 AM
Last Post: DSMan195276

Forum Jump:


Users browsing this thread: 2 Guest(s)