home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!howland.reston.ans.net!hsdndev!marby
- From: marby@laura.harvard.edu (Craig Marby)
- Newsgroups: comp.lang.fortran
- Subject: Re: A VMS Fortran I/O question
- Message-ID: <MARBY.93Jan2161438@laura.harvard.edu>
- Date: 2 Jan 93 21:14:38 GMT
- References: <C03pyp.E4v@news.cso.uiuc.edu>
- Sender: usenet@hsdndev.UUCP
- Organization: Chemistry Dept., Harvard University
- Lines: 36
- In-reply-to: ercolessi@uimrl3.mrl.uiuc.edu's message of 31 Dec 92 02:08:48 GMT
-
- >>>>> On 31 Dec 92 02:08:48 GMT, ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi) said:
-
- furio> Does anybody know (well, Steve Lionel certainly knows, but maybe
- furio> he's in holiday ...) what should I do to kill the carriage control character
- furio> on the standard output in VMS Fortran ?
-
- furio> That is, I would like to be able to code something like
- furio> PRINT '(a)','Hello'
- furio> instead of
- furio> PRINT '(1x,a)','Hello'
- furio> in order to bring the code back and forth between Unix and VMS and
- furio> retain the same behavior
-
- How about the following solution.
-
- 1. Create a temporary mailbox (pick your own name)
- 2. Assign logical FOR$PRINT to point to this mailbox.
- 3. Set up a write-attention AST on the mailbox using a SYS$QIO.
- 4. Wait for a PRINT statement to be executed.
- 5. Every time your AST is called (which will be line by line) read
- the line out of the mailbox and add an extra space at the
- beginning. You can then send it to where ever you want (you may
- want to determine this prior to step 1).
-
- The above solution seems viable to me (and I have implemented
- something similiar). It enables you, for example, to count the number
- of lines written to a particular device. The above does involve some
- non-trivial VMS specific coding however.
-
- Hope this helps.
- --
-
- __o
- _ \<,_ Craig A. Marby marby@layla.harvard.edu
- (_)/ (_)
- ~~~~~~~~~~
-