fishytiger
Technical User
I am writing an aplication where I have to pass a TYPE variable to a subroutine, but my code gives me a " More than one part reference of this data reference has a rank greater than zero." which sucks. Somehow I am able to use this in the main program but not in subroutines!, help!
! Particle variable
type particle
character(len=2) :: symbol=''
double precision, dimension(3) :: r=0.0d0
double precision, dimension(3) :: v=0.0d0
integer :: Nnb=0
integer, dimension(40) :: neighlist=0
end type
subroutine setpos(nats,artie)
use variables
integer, intent(in) :: nats
TYPE(particle), dimension(nats) , intent(out) :: artie
! Global Variables
! ===============================
! Particle variable
type particle
character(len=2) :: symbol=''
double precision, dimension(3) :: r=0.0d0
double precision, dimension(3) :: v=0.0d0
integer :: Nnb=0
integer, dimension(40) :: neighlist=0
end type
subroutine setpos(nats,artie)
use variables
integer, intent(in) :: nats
TYPE(particle), dimension(nats) , intent(out) :: artie
! Global Variables
! ===============================