🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #434

redir output of child in MS-FORTRAN ?

#434
From: roo
Date: Thu, 23 Jul 1992 16:00
48 lines
2588 bytes
I have a program written in MS-FORTRAN which runs another program as a child and
needs to redirect the screen output of the child --- currently to NUL, but it is
envisaged allowing to a file.

I am doing this via

     I = SYSTEM('prog > NUL'C)

which is the documented in the MS-FORTRAN ``Advanced Topics'' and uses the
MS-C system call.

Now, the program I am running as a child uses a large amount of memory (about
400K), so I have used the SPAWNO replacement for the system call (speaking as a
satisfied user, that's a great package BTW).

Now, because of the size of the child, I would prefer to be even more miserly
with memory, and do without losing even the 3K or so which COMMAND.COM takes up
because of the system call. So I would prefer to do something along the lines of

      CALL redirect_output(file_or_device)
      I = spawnlpe(args)


To make things more difficult, I do not have a MS-C compiler handy (for wierd
and wonderful admin reasons we use Turbo/Borland C and MS-FORTRAN around here),
so I can't use solutions which have been given in a similar thread recently on
redirecting input and output, unless there is a good way to access Turbo C from
MS-FORTRAN.

Any advice/pointers/RTFM's will be much appreciated.

----------------
Robert O'Dowd                              Phone  : +61 8 259 7132
Bldg. 64 TSAN,  AS/MOD                     Fax    : +61 8 259 6104
P.O. Box 1700                              E-mail : roo@dstos3.dsto.oz.au
DSTO Salisbury, South Australia               OR    roo@dstos3.dsto.gov.au
                                              OR    roo@mod.dsto.gov.au
Std Disclaimer: Opinions above are MINE, probably worth what you paid for them.

-- 
----------------
Robert O'Dowd                              Phone  : +61 8 259 7132
Bldg. 64 TSAN,  AS/MOD                     Fax    : +61 8 259 6104
P.O. Box 1700                              E-mail : roo@dstos3.dsto.oz.au
DSTO Salisbury, South Australia               OR    roo@dstos3.dsto.gov.au
                                              OR    roo@mod.dsto.gov.au
Disclaimer: Opinions above are MINE, and probably worth what you paid for them.
Technical Details
Message-ID: <1992Jul23.100006.164260@dstos3.dsto.gov.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!mips!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!roo

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!mips!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!roo
From: roo@dstos3.dsto.gov.au
Newsgroups: comp.os.msdos.programmer
Subject: redir output of child in MS-FORTRAN ?
Message-ID: <1992Jul23.100006.164260@dstos3.dsto.gov.au>
Date: 23 Jul 92 16:00:05 GMT
Organization: Defence Science and Technology Organisation
Lines: 48