home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!hermes.chpc.utexas.edu!michael
- From: michael@chpc.utexas.edu (Michael Lemke)
- Subject: Re: A VMS Fortran I/O question
- Message-ID: <1993Jan3.040453.20688@chpc.utexas.edu>
- Organization: The University of Texas System - CHPC
- References: <C03pyp.E4v@news.cso.uiuc.edu> <MARBY.93Jan2161438@laura.harvard.edu>
- Date: Sun, 3 Jan 93 04:04:53 GMT
- Lines: 45
-
- In article <MARBY.93Jan2161438@laura.harvard.edu> marby@laura.harvard.edu (Craig Marby) writes:
- >>>>>> 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).
-
- Umm, that will certainly work but isn't a bit overkill? I don't know
- how it affects performance but it certainly requires quite a bit of
- non-portable code. I'd rather think the *Unix* stuff should honor
- FORTRAN carriage control. Well, I know it doesn't but a PRINT
- statement after all creates a print file (or even sends something to a
- printer), so doesn't FORTRAN require print files to honor the carriage
- control character? What is the excuse this time that the Unix joke is
- still standard conform? I'd discourage the practice to write code
- without carriage control characters as the standard requires them,
- doesn't it? BTW, in Sun Fortran there is a special STATUS='PRINT' in
- the OPEN statement which causes the first character to be ignored if a
- blank or to be converted to a CTRL/L if a 1 etc. `+' does not work
- though. This evne works for stdout but I don't know about PRINT. Maybe
- your Unix compiler has something similar.
-
- Michael
- --
- Michael Lemke
- Astronomy, UT Austin, Texas
- (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
-