I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -


i writing program in fortran find velocity of parachuting person in relation time. keep getting error can't fix. new programming , appreciated.

the error is

v(i+1)=v(i)+[32-((c*v(i)*v(i))/m)]*(h) 1 

error: incompatible ranks 0 , 1 in assignment @ (1)

and program is

program para integer :: real :: v(11) !velocity real :: q !initial velocity real :: h !time step real :: c !drag coefficient real :: m !mass  ! gravity equal 32 ft/s^2  write (*,*)'enter time step' read(*,*)h  write(*,*)'enter initial velocity' read(*,*)q  write(*,*)'enter drag coefficient' read(*,*)c  write(*,*)'enter mass' read(*,*)m  i=1,10 ! 1 10, 1 being interval. end  v(i+1)=v(i)+[32-((c*v(i)*v(i))/m)]*(h)  q=v(1) 

end program

you cannot use [] normal parenthesis in expressions. array constructor, [ items ] means array items elements. end do should after line.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -