Here is an example off a web site,
Functions can return arrays, for example,
PROGRAM Maian
IMPLICIT NONE
INTEGER, PARAMETER :: m = 6
INTEGER, DIMENSION(M,M) :: im1, im2
...
IM2 = funnie(IM1,1) ! invoke
CONTAINS
FUNCTION funnie(ima,scal)
INTEGER...
Yes it does, and even when I try those I get the same argument type/amount error. It almost seems like there is something wrong with my compiler settings or something
Rowan
CaKiwi,
I have written it as a subroutine as well and it works fine. My boss would like it in a the form of a function though because he wants to just be able to assign the returned array to an array, as you can see in my example.
From what I have read in "Fortran 90...
Ok here is where i call it...
specarray = specinarray(component, state, spherical, h2so4, hno3, temp, interpolate)
here is a portion of the function...
!**********************************************
! specinarray
!**********************************************
FUNCTION...
Hi,
I have written a function that returns a two dimensional array. For some reason my compiler keeps telling me that my routine has been "called with different number and/or type of actual arguments in earlier call..."
I have double checked and I have made sure that the number...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.