<?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 Name conflict in Module in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786547#M30319</link>
    <description>You have to use integers for array dimensions, but you can do the following:&lt;PRE&gt;[fortran]REAL,INTENT(IN)   :: N, F(FLOOR(N)),G(FLOOR(N)) 
[/fortran]&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Nov 2010 11:02:15 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2010-11-15T11:02:15Z</dc:date>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786543#M30315</link>
      <description>I have two subroutine in a module that both have one varibale, i. in one of them I want this be a integer and in another one this should be unite imaginary, but when I define it different types it says that this name has been defined in this file with another data type! I used another names to proceed my work but I would like to know how should I compensate with this?&lt;BR /&gt;&lt;BR /&gt;another problem I have is that when I define functions after "end module" and want to call them into other functions or subroutines, visual studio recognize them as array and says they have not been defined! what should I do about this?</description>
      <pubDate>Sun, 14 Nov 2010 10:47:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786543#M30315</guid>
      <dc:creator>anishtain4</dc:creator>
      <dc:date>2010-11-14T10:47:15Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786544#M30316</link>
      <description>Can you reduce the module and subroutines to a simple case that exhibits the symptions. Then post the code?&lt;BR /&gt;With this code at hand, we can then either see the problem or compile and experience the problem.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Sun, 14 Nov 2010 16:08:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786544#M30316</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2010-11-14T16:08:28Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786545#M30317</link>
      <description>&lt;PRE&gt;[bash]REAL(8) FUNCTION NDD_F(XI,F,X,n) !NEWTON DIVIDED DIFFERENCE_FORWARD
  IMPLICIT NONE
  REAL,INTENT(IN)	::XI(:),F(:),X
  INTEGER		::N
END FUNCTION

FUNCTION CONV(F,G,N)    !CONVOLUTION
  IMPLICIT NONE
  REAL,INTENT(IN)   ::F(N),G(N),N
END FUNCTION

SUBROUTINE FFT2(F,N)  !FFT FOR A POWER OF TWO
  F(I,:)= FS(B2D(RD2B(I,DECIMINATION)),:)
END SUBROUTINE

INTEGER FUNCTION RD2B(DEC,N)  !DECIMAL TO REVERSE BINARY
  IMPLICIT NONE
	INTEGER,INTENT(IN)	::DEC,N
	INTEGER							::I,DEC_D
	REAL								::EP
	RD2B		= 0
	DEC_D		= DEC
	EP			= 1E-5
	DO I=N,1,-1
		RD2B	= RD2B+MOD(DEC_D,2)*10**(I-1)
		DEC_D	= INT(DEC_D/2)
	END DO
END FUNCTION

INTEGER FUNCTION B2D(BIN) !BINARY TO DECIMAL
  IMPLICIT NONE
	INTEGER,INTENT(IN)	::BIN
	INTEGER							::I,N,BIN_D
	REAL								::EP
	B2D		= 0
	EP		= 1E-5
	BIN_D	= BIN
	N=INT(LOG10(EP+REAL(BIN_D)))+1
	DO I=1,N
		B2D = B2D+2**(I-1)*MOD(BIN_D,10**I)/10**(I-1)
	END DO
END FUNCTION[/bash]&lt;/PRE&gt; In ndd_f I have defined N as an integer, but in conv I want to define N as a real (I know in this case that can be integer I may want to use this as wave number which is not always integer) and it says names conflict. These are all after "contains" in a module.&lt;BR /&gt;&lt;BR /&gt;other problem is with the FFT2 and B2D and RD2B, when I put the later two functions after end module a syntax error appears in FFT which says they are not defined variables! I'm not sure if the pasted code helps you, but all of the code is a little bit long for here.</description>
      <pubDate>Mon, 15 Nov 2010 06:08:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786545#M30317</guid>
      <dc:creator>anishtain4</dc:creator>
      <dc:date>2010-11-15T06:08:25Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786546#M30318</link>
      <description>&lt;P&gt;&lt;BR /&gt;FUNCTION CONV(F,G,N) !CONVOLUTION &lt;/P&gt;&lt;P&gt;IMPLICIT NONE &lt;/P&gt;&lt;P&gt;REAL,INTENT(IN) ::F(N),G(N),N &lt;/P&gt;&lt;P&gt;END FUNCTION &lt;BR /&gt;&lt;BR /&gt;The issue is not that you have the same name, but that you are trying to declare two arrays F and G with a real argument for the size. In the declarations for F(N) and G(N), the size of the arrays, "N" must be integer.&lt;BR /&gt;&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2010 06:29:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786546#M30318</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2010-11-15T06:29:07Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786547#M30319</link>
      <description>You have to use integers for array dimensions, but you can do the following:&lt;PRE&gt;[fortran]REAL,INTENT(IN)   :: N, F(FLOOR(N)),G(FLOOR(N)) 
[/fortran]&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Nov 2010 11:02:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786547#M30319</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-11-15T11:02:15Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786548#M30320</link>
      <description>Thanks david and mecej.&lt;BR /&gt;But one other question remained unanswered yet. if I wan to define a function after end module of a module file how should make fortran understand that it is a function not a variable?&lt;BR /&gt;&lt;BR /&gt;Another question raised, is there anyway other than sending in N or using UBOUND() frequently to determine dimension of helping arrays in subroutine or functions?&lt;BR /&gt;&lt;BR /&gt;To define a function we can write:&lt;BR /&gt; integer function test()&lt;BR /&gt; end function&lt;BR /&gt;or we can write:&lt;BR /&gt; function test()&lt;BR /&gt; integer::test(4)&lt;BR /&gt; end function&lt;BR /&gt;Is there any possibility that we use first form and define a function whos output is an array?</description>
      <pubDate>Mon, 15 Nov 2010 20:11:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786548#M30320</guid>
      <dc:creator>anishtain4</dc:creator>
      <dc:date>2010-11-15T20:11:23Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786549#M30321</link>
      <description>You can define arrays which are passed as arguments as, e.g.&lt;BR /&gt;&lt;BR /&gt;REAL,DIMENSION(*) :: X&lt;BR /&gt;&lt;BR /&gt;X will take whatever size it is in the calling program.&lt;BR /&gt;&lt;BR /&gt;My uderstanding on function returns is that you can only return a scalar (at least it was when I learned Fortran 30 years ago).&lt;BR /&gt;&lt;BR /&gt;I would normally pass back arrays as arguments, and normally use subroutine calls:&lt;BR /&gt;&lt;BR /&gt;Subroutine Test (XIN, XOUT)&lt;BR /&gt;REAL, DIMENSION(*), INTENT(IN) :: XIN&lt;BR /&gt;REAL, DIMENSION(*), INTENT(OUT) :: XOUT&lt;BR /&gt;&lt;BR /&gt;This also avoids the need todefine fucntion type, as in your example.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;David&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Nov 2010 00:08:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786549#M30321</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2010-11-16T00:08:21Z</dc:date>
    </item>
    <item>
      <title>Name conflict in Module</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786550#M30322</link>
      <description>You can now return arrays, but an explicit interface to the function must be visible to the caller.</description>
      <pubDate>Wed, 17 Nov 2010 00:22:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Name-conflict-in-Module/m-p/786550#M30322</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-11-17T00:22:07Z</dc:date>
    </item>
  </channel>
</rss>

