Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Huge array of variable length strings
#3
(10-17-2024, 11:11 AM)ahenry3068 Wrote: I have some ideas but it depends on the application.

Questions:
 
           What do these strings represent (Files,  A text buffer in an editor,  ??  etc)

            Why do you want to load them all at once ?

I'm thinking a more 'C' like approach where your array is actually an array of pointers then you write a couple of SUBS to allocate and deallocate _MEM for each pointer.

Then a Cleanup SUB to free all the _MEM's
I'm reading the contents of a directory with files to do a lot of searches on this content and report back which files have matches
Search terms are not known upfront but depend on content/dependencies of these files, so I can't do the searches file by file...

I am also thinking of an array of pointers to one big _Mem that I load all contents in, but I'm also curious what 'normal' variable structures can hold the biggest set of variable length strings?
Are there max size differences between variable/fixed length, arrays, shared/no-shared, dynamic/static, user defined types, etc...
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply


Messages In This Thread
RE: Huge array of variable length strings - by mdijkens - 10-17-2024, 11:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strings - Numbers Kernelpanic 0 114 01-20-2026, 10:29 PM
Last Post: Kernelpanic
  Array out of passing arrays... Pete 2 408 09-22-2025, 08:53 PM
Last Post: ahenry3068
  Variable length type declarations dano 5 690 08-06-2025, 09:53 PM
Last Post: dano
  Determining if variable or static string is passed to a Sub dano 9 1,227 06-20-2025, 06:31 PM
Last Post: CookieOscar
  Most efficient way to build a big variable length string? mdijkens 9 1,895 01-17-2025, 11:36 PM
Last Post: ahenry3068

Forum Jump:


Users browsing this thread: 1 Guest(s)