Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

FINDLOC issue

Joaquin_S_
Novice
126 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
Black Belt Retired Employee
126 Views

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

Joaquin_S_
Novice
126 Views

I'm an idiot, thanks. 

Reply