Subject: | |
From: | |
Reply To: | |
Date: | Wed, 20 Oct 1999 12:44:02 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Worked fine against an empty file - EOF went to -1 and the while loop
didn't execute at all.
On Tue, 19 Oct 1999 10:51:37 -0400, "Pickering, John (NORBORD)"
<[log in to unmask]> wrote:
>> >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
>
|
|
|