- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In case 2 it would be written:
Case 2:
function VolFracToMassFrac(VolFrac) result(Res)
real , intent(in) :: VolFrac(:)
real Res (SIZE(VolFrac))
...
end function
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page