Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Passing arrays in subroutines

$
0
0

Hello!
I am interesting, in wich cases the compiler will force to allocate any of used array from the memory

Case 1:
subroutine VolFracToMassFrac(VolFrac, MassFrac)
  real, intent(in) :: VolFrac(:)  
  real, intent(in) :: MassFrac(:)
    ...
end function

Case 2:
function VolFracToMassFrac(VolFrac, SubstCodes) result(Res)
  real    , intent(in) :: VolFrac(:)
  real Res (SIZE(VolFrac))          
    ...
end function

Case 3:
subroutine VolFracToMassFrac(VolFrac, MassFrac)
  real, intent(in) :: VolFrac(:)  
  real, intent(in) :: MassFrac(:)
      real Temp(SIZE(VolFrac))
    ...
end function

I am using Compaq Visual Fortran, but I am also intresting how it will be in the Intel Compiler.
Thank you

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>