Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Index Files
#1
Is it possible to create a file and store records with a key index ??

I would like to be able to sort the records in the file and access records in the file by a key

Many thanks in advance

- Moz
Reply
#2
Look up "OPEN" and its "FOR RANDOM" option in the on-line help.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
Well, this is not really a newbie question...

If your question is if QBasic manages indexed files as did Locomotive Basic, the answer is no.

You would have to write the code to create the index files, sort them and search them. and probably the result would not be fast.

Ethan winer's book at www.ethanwiner.com
has a complete chapter on managing databases with QB.
Antoni
Reply
#4
Yes, "Me and my Address book"

;*)

Check thi out, it indexes the random acces file and sorts it automatically.

http://relsoft.wrq.cjb.net/files/Address.bas
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#5
I'm not a newbie to programming, but a newbie to Qbasic

Thanks for all your help

- Moz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)