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

Fortran Absolute

JohnNichols
Valued Contributor III
673 Views
subroutine a(i)
implicit none
integer i
write(*,*)i
return 
end subroutine a
call a(abs(1))

 

is this call legal, it works sometimes, but occasionally it seems to miss the number.  

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
616 Views

Looks perfectly legal to me - except that you need an "end" statement. But when you say it occasionally seems to miss the number, can you say under what circumstances and how does it miss the number?

0 Kudos
JNichols
New Contributor I
600 Views

The problem has been occurring in a call that had some allocated arrays passed at the same time.  

I think I found the problem, by slowly working up for just this example to a full set of arguments and making the arrays last.  

0 Kudos
JNichols
New Contributor I
595 Views

It was a weird error and one that took a couple of hours to work through and check everything.  

It surprised me.  

0 Kudos
Reply