
   (~ = done)

   To compile using QuickBASIC, to handle the error checking BASIC functions,
   use the command d:\msqkbexe\bc %1.BAS/O /X /E;

   ~Changed subfile no. from 14 to 1.

   ~insist on area codes

   ~automatically update the "THIS RECORD'S KEY" field.

   ~strip off leading zeroes from numbers read back, if necessary

   ~do I have to always make the key uppercase? -- it's probably a good
   idea, to help avoid FUBARs.

   ~I probably need to get a file number that's higher than what the ISAM
   uses; I can't just blindly call my cross-ref file #1 and my temp file #2
   ISAM uses file number 1; so I use variables and call them 2 and 3.

   ~I have to actually check to make sure my phone number really does exist
   in phno2key.txt before deleting it. It might not actually exist. Some
   luser (naming no names) might have actually deleted the whole file.

   ~For every write, the phonenumbers with that key in the crossref file must
   be deleted in case they changed.

   ~Every time we do a read# on the same phone number, select the next key
   from the phno2key.txt until we get around to the first one again.
   Almost done -- check over loop logic in db_sk at F6 and add resets where
   purge and write are done.

   ~purge from database has to go through and remove all the phone numbers for
   that record.  Since there might be duplicate keys for the same phone
   number, check for the key to match as well.  If two people or
   organizations have the same phone number, and we purge one, we want to
   make sure we purge the right one.

   ~Read from database can just pick the first key from any old match it finds
   in the cross reference file, but write to database has to check that it
   won't write over an identical key.

   ~Compress everything but ASCII

   ~Make the binary search into a subroutine.
   ~Do the read record and uncompress.
   ~Do the purge record, using binary search subroutine.

   ~Check if date being written is less than system date, and reject it if so.
   Instead, just I read the system date.

   ~Why have a day of the week we can set wrong? Remove it or calculate it.
   Use "Reverend Zeller's formula" from my GE121 notes of summer 1983.
   -----------------------------------------------------------------------
   (Not stored this way any more; see below this block)

   Here are the lengths of the entries as compressed (un if not, number in
   brackets if)
   26 un
   26 un
   27 un
   26 un
   4    (from 7)
   38 un
   1    (from 20)
   3    (from 5)
   60 un
   17 un
   26 un
   27 un
   40 un
   13 un   --> sum is 334 up to here
   20   (from 23+24+25+25)
   ("This record's key", a field in the record, not stored)
   231 un
   1    (from 9)
   1    (from 9)
   1    (from 2)
   2    (from 4)
   ---
   590 chars as stored not including the key
   Including the key as stored = 600
   (uncompressed including the key, total length is 720)
   If we took out the 141 chars of room for "misc" notes, we would be able to
   do it in 459 chars compressed.
   -----------------------------------------------------------------------

   ~Shorten the storage requirements by averaging 1 to 14 inclusive, 20 to 29
   inclusive using nuls for demarcation in the database.
   Here are the new DB storage sizes:

    44 Give the 4 names 44 chars in DB including nuls
     4 COMPRESS 7 DIGIT BUILDING NUMBER TO 4 CHARS, WITH LEADING ZEROES
    30 ADD ON STREET FIRST NAME 'give it 30 chars
     1 COMPRESS STREET TYPE TO 1 CHARACTER
     3 COMPRESS 5 DIGIT APT NUMBER TO 3 CHARS
   116 Give the City-Postal Code 116 chars in the DB including nuls.
    20 Another 4*5 = 20 chars for the ph nos
     0 Don't put the key in the DB but make "This record's key" equal to it
   160 All associated names and Misc lines, another 9*10 + 141 = 231 chars unspace-stripped, but give it 160 in DB
     1 Weekday compresses to only a char (1 byte)
     1 Month compresses to only a char (1 byte)
     1 Day compresses to only 1 byte
     2 Year compresses to 2 bytes.
   ---
   383 characters
   including the KEY as stored = 393, a good space saving

   ~fix up the colors

   ~In Choice 2, Print Entries, I should test and print out only fields that
   have something in them. -- done Thurs Mar 24, 1994

   ~                            - use my Strip Spaces Subroutine to shorten
   the MISC and other fields -- Mar 24, 1994

   ~removed pagination from the Print Entries main menu selection. Added
   "hit any key to continue or X to quit" when printing to the screen, so
   that all records can be viewed. Added WIDTH statement to prevent
   automatic wrapping that was causing me much wondering. -- Sat Mar 26 1994.

   ~added a facility to print out the contents of the fields. Called the F7
   Key "TXT O/P". Fri Apr 1 1994.

   Apr 9 1994 - Think about changing all filesize variables from Integers
   to single precision fixed decimal place so that more than (2^15 - 1)/23
   phone numbers can be stored. ( = 32767/23 = 1424)
