Title: | -={ H A C K E R S }=- |
Notice: | Write locked - see NOTED::HACKERS |
Moderator: | DIEHRD::MORRIS |
Created: | Thu Feb 20 1986 |
Last Modified: | Mon Aug 03 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 680 |
Total number of notes: | 5456 |
Hello, I have a question. I am writting a(nother) calendar access program for my Amiga (in BASIC) need a little help on how to store the dates as the keys in a file. I realize that the easiest way would be to sequencially store them then search, but this is going to be slow once the file gets large. Those of you who have solved this problem, how did you do it? If you have any sort of idea (psedocode, source, even a rudimentry flowchart) could you help ? Thanks, Rob
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
548.1 | PSW::WINALSKI | Paul S. Winalski | Sun Sep 13 1987 17:05 | 9 | |
What you want is an indexed sequential file. If BASIC on the Amiga doesn't have built-in ISAM support, then you will have to implement it yourself. Your best bet is to store the index structure as a B-tree. Take a look in Knuth's THE ART OF COMPUTER PROGRAMMING, Volume 3: Sorting and Searching. The algorithms for constructing and searching B-trees are given there. You can also find them in other computer science textbooks dealing with data structures and file representations. --PSW |