- #1

Giammy85

- 19

- 0

I'm allocating the dimension of some arrays once I have calculated steps, then I send the allocated arrays to a function but I have the error Type/rank mismatch in argument 'a'.

What am I doing wrong?

Cheers

integer i, steps, noutput, savestep

double integrationtime, outputstep, timestep, deltat, ain, ein

real, dimension(:), allocatable :: a, e, time

steps=int(integrationtime/timestep)

allocate(time(steps), a(steps), e(steps))

time(0)=0.0d0

a(0)=ain*1.49597870691d11

e(0)=ein

call calc (steps, a, e, time)

stop

contains

subroutine calc (steps, a, e, time)

integer i, steps

double precision time(steps), a(steps), e(steps)

do i=1, steps

time(i)=

a(i)=...

e(i)=...

end subroutine calc