On Thu, Sep 11, 2003 at 03:01:39PM +0200, Maciej ?aszcz wrote: > On Thu, 11 Sep 2003, James Mills wrote: > > > Hi, > > > > The following (attached) is a programming problem I've implemented. > > Now I know the way I've done the EOF test is not correct, otherwise it > > would not crash with a runtime error of 106. > > > > Could someone show me the correct way of reading from stdin until there > > is no more input ? > > Have you tried to change the read to readln? IMO you are reading EOLN to > the integer.
Well if you look at the input file it containts: 1 2 3 5 100 200 ... etc Would you still be able to do: readLn(input, i, j); ? cheers James -- - -Zero Defect Software Engineers Group - ZDSEG - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape. _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal