🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8676

Re: I/O redirection in Turbo Pascal

#8676
From: S. John Banner
Date: Thu, 30 Oct 1986 04:39
21 lines
1691 bytes
In article <197@sandia.UUCP> marms@sandia.UUCP (Mike Arms) writes:
>I ran into this "problem" myself some months ago. I wanted to pipe
>the output of my Turbo Pascal program to a file (ie: "work.com > file"). 
>After beating my head against a wall trying all kinds of things, I found
Same Here.
>the simple answer in the book. There is a compiler directive to set the
>I/O mode such that stdin and stdout can be redirected. I don't have the 
>book with me but it is probably either {$I-} or {$I+}.

Actually, you have to use the G, and P directives, to set file buffer
sizes, and if you want to send the output (or get the input), from a
device rather than a file  ("uudecode < com1:", or whatever), you 
also have to set another directive (B I think), otherwise it will reset
your buffers to 0 again.  The I directive is strictly used to determine
what to do on an input error.

                      S. John Banner

UUCP:     ...!uw-beaver!uvicctr!sbanner1
BITNET:   ccsjb@uvvm
EAN:      sbanner1@uvunix.uvic.cdn
Technical Details
Message-ID: <199@uvicctr.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!sri-unix!hplabs!tektronix!uw-beaver!fluke!ssc-vax!uvicctr!sbanner1
References: <447@unm-la.UUCP> <197@sandia.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!sri-unix!hplabs!tektronix!uw-beaver!fluke!ssc-vax!uvicctr!sbanner1
From: sbanner1@uvicctr.UUCP (S. John Banner)
Newsgroups: net.micro.pc
Subject: Re: I/O redirection in Turbo Pascal
Message-ID: <199@uvicctr.UUCP>
Date: Wed, 29-Oct-86 23:39:40 EST
Article-I.D.: uvicctr.199
Posted: Wed Oct 29 23:39:40 1986
Date-Received: Mon, 3-Nov-86 22:54:23 EST
References: <447@unm-la.UUCP> <197@sandia.UUCP>
Reply-To: sbanner1@uvicctr.UUCP (S. John Banner)
Distribution: net
Organization: University of Victoria, Victoria B.C. Canada
Lines: 21