[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

use of functions in newly developed TYPE



Dear all,

Creating a new TYPE, I encountered a strange problem regarding the use of all functions I defined, the subroutines perform well.

I define a function kronecker and use it in a subroutine calculate_F(see below), the compiler gives an error message (see below) which suggests that the function is not found.This error message occurs each time I try to use one the functions. When I implement the same function kronecker in another TYPE (f.i. 60) and use it in a subroutine there, it works fine. When using these routines in a program to test them, there were no problems encountered.
Does someone have an idea what could cause this problem?

Thanks
Dirk

function kronecker(x,y)
implicit none
integer::x,y,kronecker
kron: if (x.eq.y) then
kronecker=1
else
kronecker=0
end if kron
end function kronecker

subroutine calculate_F(N,VF,F,rho,eps)
implicit none
integer::N,i,j
real(kind=8),intent(out)::F(:,:),rho(:),eps(:)
real(kind=8),intent(in)::VF(:,:)
eps=0.84d0
rho=1.0d0-eps F=0.0d0
do i=1,2*N+2
do j=1,2*N+2
F(I,J)=(kronecker(i,j)-rho(i)*VF(i,j))/eps(i)
end do
end do
end subroutine calculate_F

Error message:

C:\Trnsys15\Types\type901.f90(422) : Error: This name does not have a type, and must have an explicit type. [KRONECKER]
F(I,J)=(kronecker(i,j)-rho(i)*VF(i,j))/eps(i)

--
Dr.ir. D. Saelens, postdoc fellow IWT Flanders
Laboratory for Building Physics, K.U.Leuven
Kasteelpark Arenberg 51, 3001 Leuven, Belgium


T: +32 16 321345
F: +32 16 321980

www.kuleuven.ac.be/bwf