Jourdan Gold wrote:
> hello, I am a Fortran newbie. My question may be very simple but please dso not spam me. I have read over a fortran book and can not easily find an answer to my problem there.
>
> I have an array that I create in a subroutine and then output into the main program using the intent out option. it gives me a value a series of ones and zeros when I do so. this part of the program works. I then assign it to another array --- again which works. However, when I then attempt to input it into another subroutine, using the intent in option and its values change to all zeros. I have no idea why the program is doing this. the array of interest is: subinfect_tim
>
>
> please find below a copy of my code. I have put comments in many places to explain what I doing so I hope that that the code is interpretable
>
The Nag compiler shows this:
Error: temp.f90, line 132: Implicit type for INDIVIDUAL
detected at INDIVIDUAL@)
Error: temp.f90, line 135: Symbol INDIVIDUAL has already been implicitly typed
detected at ,@INDIVIDUAL
When I corrected this by moving line 135 forward, I got
Error: temp.f90: Argument SUBINFECT_TIM (no. 6) in reference to INFECTIND from
INFECTGRID has the wrong data type INTEGER (expected REAL)
Error: temp.f90: Argument SUBNUM_INF (no. 2) in reference to INTNUMINFGEN from
INFECTGRID is not an array
Hope this helps,
John Reid.
|