On Dec 18, 10:17 pm, Joe <j...@[EMAIL PROTECTED]
> wrote:
> Jim Leonard wrote:
> > On Dec 18, 11:49 am, Joe <j...@[EMAIL PROTECTED]
> wrote:
> >> All records seem to start at 0. Well I read that you can set them so
> >> that the record starts with 1 and not 0.
>
> > All programmers worth their salt start counting from 0. The more
> > experienced a programmer you become, the more you'll understand why.
>
> >> 1 should be the first record. SO that when the program detects a 0.
then
> >> theres no records and the program can go on do what ever.
>
> > Then write code/logic that works around 0 as a special case. Or, as I
> > said above, adjust your thinking so that you start counting from 0 as
> > well.
>
> Ok, do you have a way to tell when I database has 0 records in. That way
> I would be able to tell the program what to do. That way I could avoid
> all these crashes
In the olden days, before there were so many nice functions to give us
info on files, we would initialize a file such that record 0 would
contain info on the file. Usually it would simply contain the # of
records in the file. Of course you'd need to update it, but it came in
handy in the case of files on tape...


|