🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8425

I/O redirection in Turbo Pascal

#8425
From: David W. Barts
Date: Tue, 21 Oct 1986 05:12
30 lines
1682 bytes
If you have tried it, you know that it doesn't work.  Coming
from a UNIX environment, where redirection works for programs
written in any language, I find this very disturbing.  My question
is, is there an easy way to write Turbo programs that send
output to standard output so that <, >, and | work?

I have tried using the intr($21, ) call for this.  It works,
but then there's the problem of echoing standard input.  You
can either ALWAYS echo stdin (AH = 01, not what I want if stdin is
a file), or NEVER do it (AH = 08, unacceptable if stdin is CON:)

What I am looking for is either

	a.  A way to tell if stdin is CON:, so I can then
	    echo or not echo as is appropriate, or

	b.  A way to do this WITHOUT having to resort to
	    issuing DOS interrupts in my Pascal code.

Please respond directly to me and not to the net as I am
years behind in reading net articles and probably won't get
caught up any time soon.  In a few weeks I will summarize to
the net.
-- 

		--David Barts  N5JRN
		... {cmcl2,ihnp4}!lanl!unm-la!cs457ab
		... {ucbvax,gatech}!unmvax!unm-la!cs457ab
		unm-la!cs457ab@lanl.arpa
		University of New Mexico - Los Alamos
Technical Details
Message-ID: <447@unm-la.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!rutgers!pyrnj!esquire!cmcl2!lanl!unm-la!cs457ab

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!rutgers!pyrnj!esquire!cmcl2!lanl!unm-la!cs457ab
From: cs457ab@unm-la.UUCP (David W. Barts)
Newsgroups: net.micro.pc
Subject: I/O redirection in Turbo Pascal
Message-ID: <447@unm-la.UUCP>
Date: Tue, 21-Oct-86 01:12:35 EDT
Article-I.D.: unm-la.447
Posted: Tue Oct 21 01:12:35 1986
Date-Received: Wed, 22-Oct-86 04:34:11 EDT
Distribution: net
Organization: Univ. of New Mexico, Los Alamos
Lines: 30