Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

FINDLOC issue

Joaquin_S_
Novice
341 Views

Getting:

error #6413: This global name is invalid in this context.   [FINDLOC]  

After running this:

program findloc
    implicit none
    integer :: i,res
    real*8 :: j = 5.0D+00
    real*8,dimension(5) :: A
    
    do i=1,5
        A(i) = dble(i)/j
    end do
    
    write(6,*) findloc(A,1/5)
    
end
    

 

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
341 Views

You named the program FINDLOC - you can't then try calling it as a function.

0 Kudos
Joaquin_S_
Novice
341 Views

I'm an idiot, thanks. 

0 Kudos
Reply