Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!mit-eddie!rassilon From: rassilon@eddie.MIT.EDU (Brian Preble) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo Pascal vs. the Input standard file Message-ID: <5983@eddie.MIT.EDU> Date: Mon, 1-Jun-87 11:57:32 EDT Article-I.D.: eddie.5983 Posted: Mon Jun 1 11:57:32 1987 Date-Received: Wed, 3-Jun-87 00:55:40 EDT References: <2575@ncoast.UUCP> Reply-To: rassilon@eddie.MIT.EDU (Brian Preble) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Lines: 29 In article <2575@ncoast.UUCP> allbery@ncoast.UUCP (Brandon S. Allbery) writes: >I'm trying to write a program which will read standard input or files named >on the command line. (It's a program to expand tabs and formfeeds for my >DuMbPrinter-105.) The main block seemed simple enough: > ... code deleted ... > >BUT -- My Turbo Pascal (3.01A) doesn't seem to recognize Input as a file. This is true, the device name you're looking for is CON, as in Process(CON). Also, make sure that you don't try to close it. (Nothing SHOULD happen but you never know.) In addition, make sure that you've included the compiler directive B+. I know this is the default setting but it helps to make sure. This way, if you ever have to compile your software on a machine with different defaults you know it will run correctly. The main difference between B+ and B- is that B+ assigns STDIN and STDOUT to the console whereas B- assigns them to a terminal (TRM). -- Rassilon DISCLAIMER Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integrel polytheism is beyond the scope of this article.)