<?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 Case selection problem in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Case-selection-problem/m-p/785815#M29977</link>
    <description>I need function, which will be dependent from some real parameter and also&lt;BR /&gt;can be determinated from some integer, like that:&lt;BR /&gt;Function SomeFunction (A, b)&lt;BR /&gt; A: real(8), b- integer (type of function)&lt;BR /&gt;My problem is that I couldn`t make it with case selection.&lt;BR /&gt;Looks like:&lt;BR /&gt;Case(I) then i=1&lt;BR /&gt; SomeFunction=A*2&lt;BR /&gt;Case(I) then i=2&lt;BR /&gt; SomeFunction=exp(A)&lt;BR /&gt;Help me please.&lt;BR /&gt;</description>
    <pubDate>Mon, 29 Sep 2003 14:01:43 GMT</pubDate>
    <dc:creator>rus_nur</dc:creator>
    <dc:date>2003-09-29T14:01:43Z</dc:date>
    <item>
      <title>Case selection problem</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Case-selection-problem/m-p/785815#M29977</link>
      <description>I need function, which will be dependent from some real parameter and also&lt;BR /&gt;can be determinated from some integer, like that:&lt;BR /&gt;Function SomeFunction (A, b)&lt;BR /&gt; A: real(8), b- integer (type of function)&lt;BR /&gt;My problem is that I couldn`t make it with case selection.&lt;BR /&gt;Looks like:&lt;BR /&gt;Case(I) then i=1&lt;BR /&gt; SomeFunction=A*2&lt;BR /&gt;Case(I) then i=2&lt;BR /&gt; SomeFunction=exp(A)&lt;BR /&gt;Help me please.&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Sep 2003 14:01:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Case-selection-problem/m-p/785815#M29977</guid>
      <dc:creator>rus_nur</dc:creator>
      <dc:date>2003-09-29T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Case selection problem</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Case-selection-problem/m-p/785816#M29978</link>
      <description>I have tried it and it works for me. My code is:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;PROGRAM casee

INTERFACE
REAL*8 FUNCTION Funkce(A,b)
REAL*8 A
INTEGER b
END FUNCTION
END INTERFACE

REAL*8 A,res
INTEGER b, ii

A=2.3D0
DO 5 ii=1,5
res=Funkce(A,ii)
WRITE (*,'(a,F10.5)') 'Result = ',res
5 CONTINUE
STOP
END

REAL*8 FUNCTION Funkce(A,b)

REAL*8 A
INTEGER b

SELECT CASE (b)

CASE(1)
Funkce=3*A+2.1
CASE(2)
Funkce=A**2+9
CASE(3)
Funkce=exp(A)
CASE(4)
Funkce=sin(A)
CASE(5)
Funkce=abs(A)
END SELECT

RETURN
END FUNCTION
&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Sep 2003 17:12:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Case-selection-problem/m-p/785816#M29978</guid>
      <dc:creator>meistrv</dc:creator>
      <dc:date>2003-09-29T17:12:35Z</dc:date>
    </item>
  </channel>
</rss>

