I have been looking all over for that, and I could not find anyplace that associated "input" to CRT or Keyboard. I knew I had to be closing a file someplace, but I did not know how to open it. How did you know to just leave a blank file open? I really don't need to know, just curious.
This well-known for at least 25 years. Here a relevant quote from the Turbo Pascal 7 Language Guide from 1992
Correct. Even TP 1.0 specifies that. And ISO mode as well.
That documentation is freely available.
1.0:
http://edn.embarcadero.com/article/20693 (there are more there)
3.0:
http://electrickery.xs4all.nl/comp/tp30/doc/index.html5.5:
https://edn.embarcadero.com/article/images/20803/TP_55_OOP_Guide.pdf (there are more there..., maybe I picked the wrong link here)
Or don't use crt: your code does not seem to need it.
If I remember correctly even UCSD pascal on Apple IIe behaves the same regarding this subject. (But I have to check that, long time since I learned that and taught that at university(1981))
The correct way to solve this is not to assign to "input" but to a TEXT file or the above option given by gammatester.