retarray_2.f90

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· F90 代码 · 共 21 行

F90
21
字号
! Procedure to test module procedures returning arrays.! The array spec only gets applied to the result variable, not the function! itself.  As a result we missed it during resolution, and used the wrong! calling convention (functions returning arrays must always have explicit! interfaces).module retarray_2contains  function z(a) result (aout)  integer, dimension(4) :: aout,a  aout = a  end function zend module retarray_2program retarray  use retarray_2  integer, dimension(4) :: b, a=(/1,2,3,4/)  b =  z(a)  if (any (b .ne. (/1, 2, 3, 4/))) call abortend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?