<?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 fortran compile ERROR ! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fortran-compile-error/m-p/3450555#M708124</link>
    <description>First of all, I am almost unfamiliar with fortran language as well as compiler.&lt;BR /&gt;&lt;BR /&gt;The version of Fortran compiler is B.11.11.71 (F90 v2.7.1), on HP D380 Server with HP-UX 11i OS.&lt;BR /&gt;&lt;BR /&gt;The source code is as follows:&lt;BR /&gt;=============================================&lt;BR /&gt;RECURSIVE FUNCTION FACTORIAL( X )&lt;BR /&gt;&lt;BR /&gt;real :: x, GAMMA&lt;BR /&gt;&lt;BR /&gt;if ( X .gt. 12.0 ) then&lt;BR /&gt;  FACTORIAL = GAMMA( X+1 )&lt;BR /&gt;else&lt;BR /&gt;  if ( X .le. 1.0 ) then&lt;BR /&gt;    FACTORIAL = 1.0&lt;BR /&gt;  else&lt;BR /&gt;    FACTORIAL = X * FACTORIAL( X-1 )&lt;BR /&gt;  end if&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;END&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;But when compiling, it shows that:&lt;BR /&gt;=============================================&lt;BR /&gt;# f90 -c factorial.f90&lt;BR /&gt;factorial.f90&lt;BR /&gt;   external function FACTORIAL&lt;BR /&gt;    FACTORIAL = X * FACTORIAL( X-1 )&lt;BR /&gt;                    ^&lt;BR /&gt;Error 282 at (11:factorial.f90) : This is not the name of a function but of a function result&lt;BR /&gt;&lt;BR /&gt;1 Error&lt;BR /&gt;f90: Errors detected.&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;I really don't know what's wrong. Help me please !</description>
    <pubDate>Mon, 27 Dec 2004 01:41:46 GMT</pubDate>
    <dc:creator>Kinmax_1</dc:creator>
    <dc:date>2004-12-27T01:41:46Z</dc:date>
    <item>
      <title>fortran compile ERROR !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fortran-compile-error/m-p/3450555#M708124</link>
      <description>First of all, I am almost unfamiliar with fortran language as well as compiler.&lt;BR /&gt;&lt;BR /&gt;The version of Fortran compiler is B.11.11.71 (F90 v2.7.1), on HP D380 Server with HP-UX 11i OS.&lt;BR /&gt;&lt;BR /&gt;The source code is as follows:&lt;BR /&gt;=============================================&lt;BR /&gt;RECURSIVE FUNCTION FACTORIAL( X )&lt;BR /&gt;&lt;BR /&gt;real :: x, GAMMA&lt;BR /&gt;&lt;BR /&gt;if ( X .gt. 12.0 ) then&lt;BR /&gt;  FACTORIAL = GAMMA( X+1 )&lt;BR /&gt;else&lt;BR /&gt;  if ( X .le. 1.0 ) then&lt;BR /&gt;    FACTORIAL = 1.0&lt;BR /&gt;  else&lt;BR /&gt;    FACTORIAL = X * FACTORIAL( X-1 )&lt;BR /&gt;  end if&lt;BR /&gt;end if&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;END&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;But when compiling, it shows that:&lt;BR /&gt;=============================================&lt;BR /&gt;# f90 -c factorial.f90&lt;BR /&gt;factorial.f90&lt;BR /&gt;   external function FACTORIAL&lt;BR /&gt;    FACTORIAL = X * FACTORIAL( X-1 )&lt;BR /&gt;                    ^&lt;BR /&gt;Error 282 at (11:factorial.f90) : This is not the name of a function but of a function result&lt;BR /&gt;&lt;BR /&gt;1 Error&lt;BR /&gt;f90: Errors detected.&lt;BR /&gt;=============================================&lt;BR /&gt;&lt;BR /&gt;I really don't know what's wrong. Help me please !</description>
      <pubDate>Mon, 27 Dec 2004 01:41:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fortran-compile-error/m-p/3450555#M708124</guid>
      <dc:creator>Kinmax_1</dc:creator>
      <dc:date>2004-12-27T01:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: fortran compile ERROR !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fortran-compile-error/m-p/3450556#M708125</link>
      <description>Hello:&lt;BR /&gt;&lt;BR /&gt;I'm kind of rusty at Fortran, but I'd say all you need to do is something similar to this example from the HP docs:&lt;BR /&gt;&lt;BR /&gt;RECURSIVE FUNCTION factorial (n) RESULT(r)&lt;BR /&gt;  INTEGER :: n, r&lt;BR /&gt;  IF (n.ne.0) THEN&lt;BR /&gt;    r = n*factorial(n-1)&lt;BR /&gt;  ELSE&lt;BR /&gt;    r = 1&lt;BR /&gt;  ENDIF&lt;BR /&gt;END FUNCTION factorial&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;   Dave&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Dec 2004 18:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fortran-compile-error/m-p/3450556#M708125</guid>
      <dc:creator>David Johns</dc:creator>
      <dc:date>2004-12-27T18:05:59Z</dc:date>
    </item>
  </channel>
</rss>

