I having trouble getting rid of this error in the code below. There are 3 functions; dev, norm and clcMatA. The first two functions are called in the third one. But they are not recognized as functions. I have defined them like I do for other functions but I didn't get such errors before.
The errors:
Error 1 error #6404: This name does not have a type, and must have an explicit type. [DEV] D:\Users\Vahid\Documents\Visual Studio 2008\Projects\Tst\Tst\Source1.for 66 Error 2 error #6404: This name does not have a type, and must have an explicit type. [NORM] D:\Users\Vahid\Documents\Visual Studio 2008\Projects\Tst\Tst\Source1.for 78
I would really appreciate any help. Thanks.
The code (in fixed format; .for):
module parameters implicit none save integer :: i,j real*8 :: pi = 3.14159265358979323846,KP = 5.e-8, M = 0.5 real*8 :: expValPStran, expValDStran, expValVolume end module *********************************** program empty end program *********************************** function norm(matrix) use parameters implicit none real*8, allocatable, intent(in) :: matrix(:) real*8 :: norm,sum integer :: dim dim = size(matrix,1) sum = 0. do i=1,dim sum = sum + matrix(i)**2 end do norm = sqrt(sum) end function *********************************** ! calculates the deviatoric part of the current stress cStress function dev(cStress,I_dev,ntens) use parameters implicit none integer :: ntens real*8 :: cStress(ntens),I_dev(ntens,ntens) real*8 :: dev(ntens) dev = matmul(I_dev,cStress) end function *********************************** function clcMatA(cStress,D,I_dev,dtime,ndi,ntens) use parameters implicit none integer :: ndi,ntens real*8 :: Z(2,ntens), dProductIDev(ntens,ntens), 1clcMatA(ntens,ntens),D(ntens,ntens),I_dev(ntens,ntens), 2cStress(ntens),dProductSigmadev2(ntens,ntens), 3sigmaDevDyadicProduct(ntens,ntens),identity(ntens,ntens), 4sigmaDev(ntens),alpha, beta,dtime alpha = expValVolume/(2*expValDStran) beta = (6*expValVolume/(pi*expValPStran))**(1/M)*KP sigmaDev = dev(cStress,I_dev,ntens) dProductIDev = matmul(D,I_dev) do i=1,ntens do j=1,ntens sigmaDevDyadicProduct(i,j)= sigmaDev(j)*sigmaDev(i) end do end do do i=1,ntens clcMatA(i,:) = dtime*( (alpha+beta* 1 norm(sigmaDev)**(1./m-1.))*dProductIDev(i,:) + beta*(1./m-1.)* 2 norm(sigmaDev)**(1./m-3.) ) end do end function