Keyed access file or similar?
Posted: Mon Jun 05, 2023 9:45 pm
Hi, I came from Business BASIC (BBx, ProvideX, PxPlus, etc), and bought a PureBASIC because I used it several (many!) years ago, and I liked it a lot. But, now, I think perhaps I can write some programs in PB instead of Business BASIC; but my main concern is I don't know if there a file storage similar to Business BASIC, where I can do:
! MYFILE is simple file, like STUDENTS.DAT or XXX.TXT or NOTHING.PNG, just with an internal structure
open(chan)MYFILE$
input "Key: ",cust_code$
read (chan,key=cust_code$)
...
write(chan)
...
The record access is made by a string (alphanumeric) key and is almost instantly; not Databases, no external tools, just a plain file with a excellent I/O method, and very fast (and we can store millions of records). Of course the language also support DataBase access, but that's not the question for me...
I've read a lot of pages, and only found a map structure that looks like keyed files, but I don't know if they can be used in the same (or similar) way. I know each language has is advantages and differences, but I'm used to this kind of storage and is ideal (for me) in small projects.
Best regards,
Jean H//
! MYFILE is simple file, like STUDENTS.DAT or XXX.TXT or NOTHING.PNG, just with an internal structure
open(chan)MYFILE$
input "Key: ",cust_code$
read (chan,key=cust_code$)
...
write(chan)
...
The record access is made by a string (alphanumeric) key and is almost instantly; not Databases, no external tools, just a plain file with a excellent I/O method, and very fast (and we can store millions of records). Of course the language also support DataBase access, but that's not the question for me...
I've read a lot of pages, and only found a map structure that looks like keyed files, but I don't know if they can be used in the same (or similar) way. I know each language has is advantages and differences, but I'm used to this kind of storage and is ideal (for me) in small projects.
Best regards,
Jean H//