Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!hydra!cc.helsinki.fi!lehvaslaiho From: lehvaslaiho@cc.helsinki.fi Newsgroups: comp.sys.mac.programmer Subject: Readln in THINK Pascal, a bug? Message-ID: <1991Feb12.100618.4840@cc.helsinki.fi> Date: 12 Feb 91 10:06:18 GMT Organization: University of Helsinki Lines: 27 Could someone please explain me what should I do to read from keyboard more than one value with more than one readln procedures. I am trying to write standard Pascal with THINK Pascal 3.01 and every time my program encounters the second readln() it reports an error: Unexpected end of file. With the help of manual I have put an writeln(eof) statements in the program and found that it really thinks it has read to the end of the file coming from the keyboard. I can not reset my keyboard "file", can I?! An other peculiarity is that if I step through the program I do not get the error message. I should be able to run the following example program in any Pascal implementation, why not in THINK Pascal? Is this a bug or one of the infamous peculiarities of Macintosh OS programming? program ReadlnTest (input, output); var X: integer; begin readln(x); readln(x); end. Heikki Lehvaslaiho Cancer Biology Laboratory Departments of Pathology and Virology University of Helsinki, FINLAND