MikeEd: I quote from the Object Pascal reference manual:
Note: Text-oriented I/O is available only in console applications—that is, applications compiled with the “Generate console application” option checked on the Linker page of the Project Options dialog box or with the -cc command-line compiler option. In a GUI (non-console) application, any attempt to read or write using Input or Output will produce an I/O error.
I inadvertantly tried writeln(File, var, ...) after moving from a console app to a GUI app and had I/O errors - and then saw the above warning in the manual. It's possible that I was trying to use the implied Output file (and it makes sense that you can't use Input or Output in a GUI app) but the manual in unequivocal in its warning about text-oriented I/O in general.
sggaunt: Thanks but, as you suspect, I don't want the overhead of loading the whole file at once.
I've since written a crude routine to emulate readln, but still wonder if I had to bother!