Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!skipper!elxsi!maine From: maine@elxsi.dfrf.nasa.gov (Richard Maine) Newsgroups: comp.lang.fortran Subject: Re: avoiding newline after end of WRITE string Message-ID: Date: 2 Feb 90 18:47:25 GMT References: <5588@hydra.gatech.EDU> <1706@milton.acs.washington.edu> Sender: news@skipper.dfrf.nasa.gov Organization: NASA Dryden, Edwards, Cal. Lines: 31 In-reply-to: whit@milton.acs.washington.edu's message of 2 Feb 90 07:05:23 GMT On 2 Feb 90 07:05:23 GMT, whit@milton.acs.washington.edu (John Whitmore) said: John> When I needed to do this, I used a standard manual and came John> up with a way that works (on a VAX) without using nonstandard John> statements or formats. I opened the output file FILE='TT:' John> for the terminal output, as FORM='UNFORMATTED'. Subsequent John> writes to the unformatted unit gave prompts as you specify, John> and when CR/LF was needed, I just wrote those (or used another John> unit with TT: opened FORMATTED). John> This depends on a filename being available which translates John> to "terminal_output", so may be system-dependent anyhow. At least John> if it doesn't work, the syntax will still pass for standard Fortran. The syntax, yes, but several of the semantic issues may be very tricky. You mentioned the availablity of appropriate file names. Another problem is that you have 2 units open for the same device. This can cause lots of problems, the simplest possibility being that the system may just refuse to do it. All in all, I'd say this was less portable than the $ format. Sure, it will compile; but it might not run at all on some systems. Regardless of whether one uses this approach, the $ format descriptor, or some other approach on the Vax, they are all system dependent. Thus, the most important thing is to isolate and document the dependence as in my comments in my prior posting. The approach John suggested is certainly useable as one of the system-specific implementations of my suggested "prompt" (or choose your own name) routine. -- Richard Maine maine@elxsi.dfrf.nasa.gov [130.134.64.6]