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
aryabtsev  
View profile
 More options May 29 1998, 3:00 am
Newsgroups: comp.lang.fortran
From: ARyabt...@my-dejanews.com
Date: 1998/05/29
Subject: Re: [Q] WRITE without newline?

> > 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.
> 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

Yes! it'll be print on the same line but from the begining of the line!
I think, the question was how to continue printing on the same line.
It is depend on compiler. For example MS Fortran use back slash format
specify:

      WRITE(*,1000)
1000  FORMAT(' Input value for I - ' \)
      READ(*,*) I

As I remeber some other compiler use '$' instead '\'

 Hope this can help!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


    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