<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fortran problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084844#M39019</link>
    <description>The manual clearly says: "An interface block comprises its own scoping unit, and does not inherit anything from its host though host association."  That means that the structure X declared earlier is not visible inside the interface block.  Things like INTERGER*4 or CHAR*(*) are builtin types that are available at any time.</description>
    <pubDate>Tue, 18 Dec 2007 21:15:05 GMT</pubDate>
    <dc:creator>John Reagan</dc:creator>
    <dc:date>2007-12-18T21:15:05Z</dc:date>
    <item>
      <title>Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084843#M39018</link>
      <description>See attachement (Fortan 8.2, Alpha)&lt;BR /&gt;&lt;BR /&gt;The documentation is not clear about specifying STRUCTURE in an INTERFACE block.&lt;BR /&gt;What worries me most is that the strcucure isn't recognized at all. If I remove the Interface block or use INTEGER*4 and CHARACTER*(*), it's no problem at all.&lt;BR /&gt;&lt;BR /&gt;What did I miss?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Dec 2007 19:47:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084843#M39018</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2007-12-18T19:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084844#M39019</link>
      <description>The manual clearly says: "An interface block comprises its own scoping unit, and does not inherit anything from its host though host association."  That means that the structure X declared earlier is not visible inside the interface block.  Things like INTERGER*4 or CHAR*(*) are builtin types that are available at any time.</description>
      <pubDate>Tue, 18 Dec 2007 21:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084844#M39019</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2007-12-18T21:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084845#M39020</link>
      <description>You do need to define an explicit interface for function Y because it has an optional argument.  However there are other ways to do this besides using an interface block.&lt;BR /&gt;&lt;BR /&gt;You could just make function Y an internal procedure by defining it after a CONTAINS statement and moving the END PROGRAM to after END FUNCTION Y.  You would then not need the INCLUDE statement inside the Y function definition.  &lt;BR /&gt;&lt;BR /&gt;Or you could define function Y in a MODULE.  You would then add a "USE module_name" statement right after the PROGRAM X line.&lt;BR /&gt;&lt;BR /&gt;For either of these alternatives remove the interface block from the include file.</description>
      <pubDate>Tue, 18 Dec 2007 23:20:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084845#M39020</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2007-12-18T23:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084846#M39021</link>
      <description>John:&lt;BR /&gt;I must have overlooked that sentence, so that explaines why the strcuture isn't recognized in the INTERFACE block. I _think_ I found a way to get around it.&lt;BR /&gt;&lt;BR /&gt;Jess:&lt;BR /&gt;This is just the reproducer, and in that context you are right, and I would have followed your suggestion anyway. In real, the problem occurs where the called routine ("Y" in the reproducer) is one of many in a library, called by many others. So your solution doesn't work here.&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Dec 2007 06:36:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084846#M39021</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2007-12-19T06:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084847#M39022</link>
      <description>Jess: &lt;BR /&gt;Overlooked the second alternative :) That might work, if that allows "PRESENT" as a check whether an argument has been passed or not (IARGCOUNT may be sufficient in some cases and Ã­s used where possible. But in some cases, this is not enough)</description>
      <pubDate>Wed, 19 Dec 2007 06:41:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084847#M39022</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2007-12-19T06:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084848#M39023</link>
      <description>Could get around the problem - those routines that have a STRUCTURE typed argument have no optional arguments so can be kept outsize INTERFACE - for the sources at hand.</description>
      <pubDate>Thu, 20 Dec 2007 20:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-problem/m-p/5084848#M39023</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2007-12-20T20:21:49Z</dc:date>
    </item>
  </channel>
</rss>

