Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!tmsoft!masnet!rose!chris.chambers From: chris.chambers@rose.uucp (CHRIS CHAMBERS) Newsgroups: comp.lang.pascal Distribution: world Subject: Overflow error Message-ID: <2bdd60c9e7152849799c@rose.uucp> Date: Sun, 2 Jun 91 16:05:00 EST Organization: Rose Media, ON, CANADA Lines: 36 From: chris.chambers@rose.uucp (Chris Chambers) Subj: Overflow error Alex Brown writes: AB> I am getting an overflow error after 3 pages are displayed. Alex, the overflow error occurs when you have read all the records from the file. You program is not coded to exit the GetString routine after the last record has been read. AB> reset(ftext); AB> getstring; AB> close(ftext); Change the second line to: repeat getstring until eof(ftext); Alex also writes: AB> The program is supposed to grab 24 lines of a text and display them AB> with a AB> >>>>>>>MORE<<<<<<<< message at the bottom. In your ShowPage procedure you do not perform the loop enough times to get this message displayed. You also need to change the logic in GetString and ShowPage to handle the variable number of lines to be displayed on the last page. I have not posted the corrected code, but sufficient pointers to get get your going. It's no fun for you if you got the canned answer, and you would not learn that way. ---