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:
"Pickering, John (NORBORD)" <[log in to unmask]>
Reply To:
Pickering, John (NORBORD)
Date:
Tue, 19 Oct 1999 10:51:37 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
> >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