Google Groups Home
Help | Sign in
Message from discussion WRITE without newline?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Ralph Jay Frisbie  
View profile
 More options May 28 1998, 3:00 am
Newsgroups: comp.lang.fortran
From: rfris...@nospam.vcnet.com (Ralph Jay Frisbie)
Date: 1998/05/28
Subject: Re: [Q] WRITE without newline?

On 27 May 1998 16:02:13 GMT, "Oleg Rokach" <rok...@ncac.torun.pl>
wrote:

>Steven G. Johnson <stev...@alum.mit.edu> wrote in article
><stevenj-ya02408000R2605981723500...@news.mit.edu>...
>> This is a very simple question I'm sure, but I don't have a Fortran
>manual
>> and I need to modify some of our code.

>> How do you do the equivalent of a WRITE statement without appending a
>> newline?  I want to do several disjoint WRITE's that output onto the same
>> line.

>> Thanks very much for your help!

>> Cordially,
>> Steven G. Johnson

>C For printing in the same line just use an "+" at the first position in
>output list.
>C ( this possibility is available since FORTRAN 66 !)
>C ----------------
>      integer i
>      do i = 1, 10000
>         write (*,'(A,2x,I5)') '+ Number= ',  i
>      enddo
>      end

        Try this, however I've worked with systems where
only the last item written appears, i.e., the screen cursor
returns to column one of the display and thus the new write
overwrites the information already there.  This often happens
so fast it's invisible, so you think the write is wrong.....
                ralph frisbie

Ralph Frisbie
  a saucer lover
      but not the inventor..


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google