Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jato!vsnyder From: vsnyder@jato.jpl.nasa.gov (Van Snyder) Newsgroups: comp.lang.fortran Subject: Re: character function subprogram Message-ID: <1991Apr11.224519.7607@jato.jpl.nasa.gov> Date: 11 Apr 91 22:45:19 GMT References: <1991Apr7.200854.25446@math.ufl.edu> <1991Apr7.211058.25661@math.ufl.edu> <1991Apr11.162324.9004@alchemy.chem.utoronto.ca> Reply-To: vsnyder@jato.Jpl.Nasa.Gov (Van Snyder) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 19 In article <1991Apr11.162324.9004@alchemy.chem.utoronto.ca> system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson)) writes: >In article <1991Apr7.211058.25661@math.ufl.edu> wang@math.ufl.edu writes: >>This would, in my opinion, miss the point of conveniency of function >>subprogram. My question is this: Why can't we call "cursor" directly >>in the PRINT statement under Sun Fortran? > >This is mentioned in some FORTRAN manuals as a limitation - you are in >effect trying to use the I/O libraries recursively in the original >program, and some I/O libraries are not re-entrant in this way. >Of course, FORTRAN-77 doesn't have to provide recursion. It also violates section 12.11 of the standard: "A function must not be referenced within an expression appearing anywhere in an input/output list if such a reference causes an input/output statement to be executed." -- vsnyder@jato.Jpl.Nasa.Gov ames!elroy!jato!vsnyder vsnyder@jato.uucp