Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
22 Views

FINDLOC issue

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
Highlighted
Black Belt Retired Employee
22 Views

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

0 Kudos
Highlighted
Beginner
22 Views

I'm an idiot, thanks. 

0 Kudos