This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36895] Namelist writting to internal files: Control characters wrong?



------- Comment #3 from burnus at gcc dot gnu dot org  2008-07-22 17:47 -------
> I will check on this later tonight or this week.  I have wondered about that
> comma myself.

Thanks! I believe the comma should be valid, even though it is superfluous and
"looks wrong". Thus it were nice if one could get rid of it, but only if it is
not too much work and does not slow down the I/O.

Regarding the line breaks: I think they are indeed wrong. At the moment I
cannot come up with a good example how this can cause problems, but I'm sure
one could construct one.

Running the following program using NAG f95 gives the error:
Invalid character '
' in NAMELIST input
Program terminated by I/O error on internal file

Thus NAG f95 does not like the line break. (The program works in g95 and
gfortran.)

----------------------
character(len=255) :: str(2)
integer :: i, j(2)
namelist /nm/i,j
i = 44
j = 45
str(1) = ' &NM '//new_line('a')//' I=          1,'
str(2) = ' J= 2*2          ,  /'
read(str,nml=nm)
print *, i, j
end
----------------------


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36895


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]