I'm new to FORTRAN programming and I've been working with code that was first compiled with Digital Visual Fortran 5.0 and am now using Intel Visual Fortran 10.1. I corrected most of the errors but I can't figure out how to declare veh(i) in this subroutine below:
The commod module looks like this:
In the main program I use OPEN statements of this sort:
OPEN (6,FILE='out.dat')
OPEN (8,FILE='in.dat')
Code:
SUBROUTINE read_veh()
USE IFQWIN
USE commod ! Access to commod.f90
IMPLICIT NONE
INTEGER(4) i,nveh
READ (8,11) rad,lane,shoulder
READ(8,10) nveh, noption
10 FORMAT(I1,1x,I1)
DO i=1,nveh
READ(8,11) veh(i).w,veh(i).wb,veh(i).ero,veh(i).efo,veh(i).pin
11 FORMAT(5(F5.2,1x),A1)
END DO
END
The commod module looks like this:
Code:
MODULE commod
IMPLICIT NONE
INTEGER(4) black,blue,green,red,cyan,purple,brown,yellow,white,grey,orange,pick,nveh,noption
REAL(8) rad,lane,shoulder
TYPE vehicle_dim
CHARACTER(25) name
CHARACTER(1) steer
INTEGER(4) veh(9)
REAL(8) x1,y1,x2,y2,w,wb,ero,efo,pin,b
END TYPE vehicle_dim
END MODULE commod
In the main program I use OPEN statements of this sort:
OPEN (6,FILE='out.dat')
OPEN (8,FILE='in.dat')