Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Indexed files
#13
(11-04-2023, 07:44 AM)PhilOfPerth Wrote: Thanks to those who tried to help me, but...  Huh
I guess I'm too old or too dense, or both, to make sense of any of the examples.
I can't get my head around the Type structures etc.
So I guess I'll go back to my (very primitive) original plan (crawls back into cave and pulls bush across doorway).
The responses were very much appreciated.

You know I was thinking after my posts there is a really easy way to do this:
Just load the file into an array and then you have an indexed access!
When done processing whatever with array just load it back into a newly rewritten file.

Then you have indexed access without any fixing up of your file as long as 1 file line is 1 record.

The array will have to be dynamic which means you can change the size of the array ie for adding new records = lines
So don't say DIM MyArray say REDIM MyArray that sets up an array to be dynamic.
THEN you can use REDIM _PRESERVE to make the array bigger to add more records.
Just keep track total Records or lines = UBOUND of array.

Also use base 1 array so REDIM MyArray(1 to MaxRecords) so the Ubound of array IS the number of records you have, no fiddling with +-1 like with 0 based arrays.

Piece of Cake man! Smile
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Indexed files - by PhilOfPerth - 11-03-2023, 11:21 PM
RE: Indexed files - by a740g - 11-03-2023, 11:40 PM
RE: Indexed files - by bplus - 11-03-2023, 11:44 PM
RE: Indexed files - by bplus - 11-03-2023, 11:50 PM
RE: Indexed files - by TerryRitchie - 11-03-2023, 11:55 PM
RE: Indexed files - by bplus - 11-03-2023, 11:55 PM
RE: Indexed files - by SMcNeill - 11-04-2023, 12:29 AM
RE: Indexed files - by bplus - 11-03-2023, 11:57 PM
RE: Indexed files - by JamesAlexander - 11-04-2023, 01:20 AM
RE: Indexed files - by PhilOfPerth - 11-04-2023, 01:39 AM
RE: Indexed files - by mnrvovrfc - 11-04-2023, 02:21 AM
RE: Indexed files - by PhilOfPerth - 11-04-2023, 07:44 AM
RE: Indexed files - by bplus - 11-04-2023, 11:54 AM
RE: Indexed files - by SMcNeill - 11-04-2023, 12:42 PM
RE: Indexed files - by Dimster - 11-04-2023, 01:57 PM
RE: Indexed files - by bplus - 11-04-2023, 04:50 PM
RE: Indexed files - by Kernelpanic - 11-04-2023, 11:13 PM
RE: Indexed files - by PhilOfPerth - 11-05-2023, 12:21 AM
RE: Indexed files - by bplus - 11-05-2023, 01:55 PM
RE: Indexed files - by PhilOfPerth - 11-05-2023, 11:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  More info about Random Access files PhilOfPerth 28 953 02-25-2026, 01:50 PM
Last Post: ahenry3068
  Embedding and Extracting MANY files ! ahenry3068 20 1,552 11-15-2025, 10:19 AM
Last Post: ahenry3068
  program that stitches together a bunch of image files into one giant poster? madscijr 15 2,369 10-24-2024, 06:08 PM
Last Post: madscijr
  Linux HTTP WEB Server Issues - Large Files Fail old_coder 0 458 03-27-2024, 08:33 PM
Last Post: old_coder
  Making the content list of files inside a Zip ? euklides 13 2,401 02-08-2024, 03:52 PM
Last Post: euklides

Forum Jump:


Users browsing this thread: 1 Guest(s)