Hi:
I've been out of practice for a year or two and am getting back into PB for DOS.
I want to set up and store junk to a file that I can retrieve junk from at any file position I choose, ie, #1, 645. I could use a working example of some code so that I could figure out what I'm doing.
I'm having trouble using a random access file. This is my syntax, which is causing problems:
junk$ = "whatever"
bufferwidth$ = "10"
field #1, width as bufferwidth$
lset bufferwidth$ = junk$
open "random.dat" for random as #1
put$ #1, junk$
close #1
Thanks, Ben
I've been out of practice for a year or two and am getting back into PB for DOS.
I want to set up and store junk to a file that I can retrieve junk from at any file position I choose, ie, #1, 645. I could use a working example of some code so that I could figure out what I'm doing.

I'm having trouble using a random access file. This is my syntax, which is causing problems:
junk$ = "whatever"
bufferwidth$ = "10"
field #1, width as bufferwidth$
lset bufferwidth$ = junk$
open "random.dat" for random as #1
put$ #1, junk$
close #1
Thanks, Ben
Comment