HP3000-L Archives

October 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Don Seay <[log in to unmask]>
Reply To:
Date:
Wed, 20 Oct 1999 12:44:02 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
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
>

ATOM RSS1 RSS2