Msg: 2779 *Conference*
06-19-92 18:23:44
From: MIKE NICHOLS
To : DREW BLANCHAR
Subj: RANDOM FILES
Hi! Rick suggested that I direct my questions to you, but if anyone else reading this has answers, I hope they will jump in, too. I'm interested in doing random access files on my 102, and being told that it "can't be done" only spurs me on. :) So far, I think I've figured out this much: Random files seem to be nothing more than sequential files that have records occuring at every 'nth' character position along the way. And if you know where the file begins in RAM, it's easy to move directly to any particular record within the file by using multiples of 'n', and PEEKING the memory at that location. Two questions, then: 1.) This would only work if each .DO file occupies contiguous memory locations in RAM, rather than being split up. The experimenting I've done seems to indicate that this is true. But can you confirm this? 2.) If .DO files keep shifting around within RAM, there has to be some way for a BASIC program to find the starting address of a given file in RAM. According to the Reference Guide, the VARPTR command is supposed to do this, but I can't seem to make it work. (I suspect a misprint in the Guide.) Do you know how to do this? Well, I hope I'm on the right track. Maybe you can set me straight if I'm not. Thanks in advance for all the help!