Subject: | |
From: | |
Reply To: | Pickering, John (NORBORD) |
Date: | Tue, 19 Oct 1999 10:51:37 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> >I concur with that assessment - the first time through the while loop,
> >eof has a value of 2. Changing the while-test to >= lets eof range
> >from 2 down to 0 for three loops.
> >
> >On Tue, 19 Oct 1999 08:59:02 -0400, Per Ostberg
> ><[log in to unmask]> wrote:
> >
> >>I think the 'eof'-var gets off by one, try and change the while-test to
> >>'>=', as 'while setvar(eof,eof-1) >= 0 do'.
> >>hth
>
> Correct problem assessment but I'd suggest setting the eof variable one
> greater than the actual eof rather than changing from "= 0" to ">= 0".
> This will prevent you from attempting to read a record from an empty file.
> Try your solution against an empty file.
>
> John Pickering
> Toronto
|
|
|