Newline (linefeed) suppress. 
Author Message
 Newline (linefeed) suppress.

Hi,

What option do I have in F77 to stop write(*,*) from adding a newline
after an output. In F95 there is this: WRITE(*.FMT=(A),ADVANCE=NO)

Using 'ADVANCE' makes g77 and ifort complain. I am sure you people know
a quick way around this. I need this feature to read values from the
cmd-line a bit more prettier.

Thanks again.

---



Wed, 13 Aug 2008 01:53:19 GMT  
 Newline (linefeed) suppress.
Why don't you download the g95 compiler from g95.org It is free and
incredibly fast. Why use obsolete language?


Wed, 13 Aug 2008 02:05:28 GMT  
 Newline (linefeed) suppress.

Quote:

> Why don't you download the g95 compiler from g95.org It is free and
> incredibly fast. Why use obsolete language?

I will soon enough. It's just that I need to do an assignment in F77.
Cannot get these last lines of codes to work properly. That's why I am
here. Feel free to comment on the problem.

---



Wed, 13 Aug 2008 02:06:39 GMT  
 Newline (linefeed) suppress.

Quote:

> What option do I have in F77 to stop write(*,*) from adding a newline
> after an output.

None in standard fortran.  In (widely imitated) VAX Fortran, check out
the $ edit descriptor.

Quote:
> In F95 there is this: WRITE(*.FMT=(A),ADVANCE=NO)

Consider getting a newsreader which posts "'" instead of "".


Wed, 13 Aug 2008 02:16:00 GMT  
 Newline (linefeed) suppress.

Quote:
>>What option do I have in F77 to stop write(*,*) from adding a newline
>>after an output.
> None in standard Fortran.  In (widely imitated) VAX Fortran, check out
> the $ edit descriptor.

This works using ifort in GNU/Linux. Thanks.

Quote:
>Consider getting a newsreader which posts "'" instead of "".

Was a paste from a PDF. Thunderbird does this fairly well :-).

---



Wed, 13 Aug 2008 02:26:41 GMT  
 Newline (linefeed) suppress.

Quote:


>>> What option do I have in F77 to stop write(*,*) from adding a newline
>>> after an output.

>> None in standard Fortran.  In (widely imitated) VAX Fortran, check out
>> the $ edit descriptor.

> This works using ifort in GNU/Linux. Thanks.

ADVANCE='no' should also work on ifort. I'm surprised that it doesn't; what
command-line options are you using?

cheers,

Rich



Wed, 13 Aug 2008 02:36:01 GMT  
 Newline (linefeed) suppress.

Quote:


> > This works using ifort in GNU/Linux. Thanks.

> ADVANCE='no' should also work on ifort. I'm surprised that it doesn't; what
> command-line options are you using?

Indeed I detect a contradiction here in the stated requirement of
sticking to Fortran 77. None of the stated solutions are Fortran 77, so
if the requirement is actually, as stated, to use Fortran 77, then these
don't do it. If the requirement is just to use something that works with
whatever compiler he has, that could make sense... except that ifort is
an f95 compiler. It also does f77, but is not restricted to that.

--
Richard Maine                     | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov            |       -- Mark Twain



Wed, 13 Aug 2008 03:07:23 GMT  
 Newline (linefeed) suppress.

Quote:

> What option do I have in F77 to stop write(*,*) from adding a newline
> after an output. In F95 there is this: WRITE(*.FMT=?(A)?,ADVANCE=?NO?)
> Using 'ADVANCE' makes g77 and ifort complain. I am sure you people know
> a quick way around this. I need this feature to read values from the
> cmd-line a bit more prettier.

No standard way.  Some compilers did it with a $ format
descriptor.

The best Fortran 66 had, and I believe still 77, was to overprint
the line with '+' carriage control.

-- glen



Wed, 13 Aug 2008 03:53:06 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. PEP 259: Omit printing newline after newline

2. PEP 259: Omit printing newline after newline

3. replacing ^M characters with linefeed

4. linefeeds in sed

5. Removal of a linefeed in

6. C3.1 Dos Printer LINEFEED Problem

7. Document editor that strips linefeeds?

8. Binary output to stdout without linefeeds, possible?

9. How do I parse with respect to a Linefeed character

10. RDE linefeeds

11. Carriage Return without a linefeed on Win95?

12. Linefeed in Unix files

 

 
Powered by phpBB® Forum Software