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 II
401 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
Valued Contributor III
344 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?

JNichols
New Contributor I
328 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.  

JNichols
New Contributor I
323 Views

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

It surprised me.  

Reply