Msg: 2804 *Conference*
06-22-92 09:54:20
From: MIKE NICHOLS
To : DREW BLANCHAR
Subj: RANDOM FILES
Hi, Drew! I've had time to play the the programs you sent me, and again many thanks. The VARPTR command is interesting, but it doesn't do what I was hoping it would. However, I was able to modify the little DIR program so that it reports back the starting address of whichever file you ask it for. So it looks like I can include it in my "random access" trivia program. It may not be as elegant as a one-line BASIC command, but it works. Yes, I realize I could just use LINE INPUT# from a BASIC program on an opened file, but that would force me to treat the file sequentially, i.e. to read in the entire file until I get to the record I need. And that could take a long time with a file as big as the one I want to use. The whole point of my query was to find some way to go *directly* to the record I want. And now I can. If each record is the exact same length, and I know the starting address for the file itself, then simple math will get me to the beginning of any particular record in memory. Then I PEEK memory at that location and VOILA! So, I guess I'm now at the point of writing the rest of the code and investigating extra memory. Have you got any ideas/suggestions for where I could get the most extra memory for my 102 with the least possible $$$ (I'm working on a tight budget, alas). Again, thanks for all your help thus far.