Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!ogicse!blake!milton!whit From: whit@milton.acs.washington.edu (John Whitmore) Newsgroups: comp.lang.fortran Subject: Re: avoiding newline after end of WRITE string Summary: Kinda standard, if TTY output is file-structured Message-ID: <1706@milton.acs.washington.edu> Date: 2 Feb 90 07:05:23 GMT References: <5588@hydra.gatech.EDU> Reply-To: whit@milton.acs.washington.edu (John Whitmore) Organization: University of Washington, Seattle Lines: 23 In article <5588@hydra.gatech.EDU> ae219dp@prism.gatech.EDU (Devon Prichard) writes: >it's probably way too user-friendly for Fortran, but waht I want >to do is; > > WRITE(*, ... ) (' enter number of widgets; ') > READ(*,*) NWIDGET > >(where the WRITE format ... means whatever technique is necessary) >in such a way that the terminal does not recieve a newline When I needed to do this, I used a standard manual and came up with a way that works (on a VAX) without using nonstandard statements or formats. I opened the output file FILE='TT:' for the terminal output, as FORM='UNFORMATTED'. Subsequent writes to the unformatted unit gave prompts as you specify, and when CR/LF was needed, I just wrote those (or used another unit with TT: opened FORMATTED). This depends on a filename being available which translates to "terminal_output", so may be system-dependent anyhow. At least if it doesn't work, the syntax will still pass for standard Fortran. I am known for my brilliance, John Whitmore by those who do not know me well.