Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29238 ディスカッション

Minloc result in disagreement with Fortran 2003

Daniel_Dopico
新規コントリビューター I
723件の閲覧回数

Is this piece of code using minloc in disagreement with the Fortran 2003 standard?

%%%%%%%%%%%%%%%%%%%%%%%%%%%

program minloc_test

implicit none

real, dimension(2):: array = (/0., 0.2/)

integer:: pos

pos = minloc(array, 1, array < 0.)

! It should be 0 according to f2003

print *, pos

! The result is 1 with Intel Fortran 2018

end program

 

0 件の賞賛
1 解決策
andrew_4619
名誉コントリビューター III
723件の閲覧回数

read https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/801969

 

元の投稿で解決策を見る

2 返答(返信)
andrew_4619
名誉コントリビューター III
724件の閲覧回数

read https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/801969

 

Daniel_Dopico
新規コントリビューター I
723件の閲覧回数

Thank you very much Andrew!

返信