advance="no" not portable
- From: "Eric Lavigne" <lavigne.eric@xxxxxxxxx>
- Date: 27 May 2005 13:15:20 -0700
This code gives different results on g95 (g95.org) and Compaq Visual
Fortran SE 6.6a. I am looking for some idea of which result is correct
(according to FORTRAN 90/95 standards) or, better yet, an alternative
way of writing it that is more portable.
OPEN (2, FILE='test.txt', ACCESS='SEQUENTIAL')
DO iter1 = 1, 3
WRITE(2,*,ADVANCE="NO") '*'
WRITE(2,*,ADVANCE="NO") '*'
WRITE(2,*,ADVANCE="NO") '*'
WRITE(2,*) ' '
END DO
CLOSE(2)
The line /WRITE(2,*) ' '/ creates one line break in g95 (the intended
result) but produces two line breaks in Compaq. With such different
results between compilers, I am probably doing this in an unusual way.
Is there a more common/portable way to produce line breaks with
non-advancing output so that I can expect all compilers to interpret it
the same way? Or do I need to find a way to produce the whole line of
data in one line of (advance="yes") code?
g95 results:
***
***
***
Compaq results:
***
***
***
.
- Follow-Ups:
- Re: advance="no" not portable
- From: Richard E Maine
- Re: advance="no" not portable
- Prev by Date: Re: question about efficiency of fortran in parallel environments
- Next by Date: Re: static function ? how ?
- Previous by thread: question about efficiency of fortran in parallel environments
- Next by thread: Re: advance="no" not portable
- Index(es):
Relevant Pages
|