Fortan allows elementary routines to have arguments of intent (inout) and intent (out), but elementary functions are allowed only intent (in).
Why? Is it just a stylistic convention, or is there something in common that involves function calls and subprogram calls?
In other words,
Elemental Integer Function FOO(i) Integer, intent(in) :: i ... FOO=something End Function
and
Elemental Subroutine FOO(i, v) Integer, intent(in) :: i Integer, intent(out) :: v ... v=something End Subroutine
Are these FOO implementations equivalently efficient?
drlemon
source share