Re: is this recursive IO ?





Joost wrote:
Hi,

I'm wondering if the following is standard f95 (not f03), in particular
if this is a recursive IO statement or not:

  i=123
  write(6,fmtget()) I
contains
  function fmtget()
   character(len=10) fmtget
   write(fmtget,*) "(I0)"
  end function
end

compilers that normally complain at runtime about recursive IO do not
seem to do that in this case (reduced from some real life code).

I couldn't really find the section of the standard that was relevant in
this case, so I would appreciate a pointer to that as well.

Section 9.7 (page 160)
" A function reference shall not appear in an expression
>>anywhere<< in an input/output >>statement<< if such a
reference causes another input/output statement to be
executed."

It's not just a restriction on the I/O list.  Surprisingly,
this doesn't appear to be called recursive I/o here.

Dick Hendrickson
Thanks,

Joost


.