Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
4 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
4 Views

You called the program

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

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
4 Views

I'm an idiot, thanks. 

I'm an idiot, thanks. 

0 Kudos