Need confirmation PR24459 is NOT-A-BUG

Paul Thomas paulthomas2@wanadoo.fr
Thu Nov 24 05:36:00 GMT 2005


Jerry,

> My interpretation is that the names qualifier (1,1) is asking for 
> exactly one data item.  Providing more is contrary to F95 standard, 
> less is OK.

I agree.

>
> So gfortran happily fills the request and starts looking for the next 
> object in the file, which does not exist and so a runtime error 
> message is given correctly.
>
ifort's behaviour is general;  the following also works.

  integer :: i (4) = (/1, 2, 3, 4/)
  namelist /nl/ i
  open (10, status = "scratch")
  write (10, '(a)') " &NL  i(2) = 3, 2, 1 &END"
  rewind (10)
  read(10, nl)
  close (10)
  print *, i
  end
 
I would eat space and, if FX's runtime standard checking allows it, peak 
ahead for a letter. If the next character is a letter, treat the new 
object, as per the standard, otherwise, if there is available space, go 
on adding data to the previous object, however it was qualified.

> I need some consensus on this before I put any more effort on it.

I would say that it is right on the margin but should be done if there 
is an easy way to do it - a Sherlock Holmes "one piper".

However, at very least, clear the PR with the message that gfortran is 
behaving according to the standard.

Paul



More information about the Fortran mailing list