[comp.lang.fortran] compiling under f77. compiler error

sas3@hcx.uucp (Scott Alan Stuff) (07/12/89)

    When compiling the following subroutine with the 'make' command
I recieve a compiler error pointing to the end statement in the last
line.  The subroutine was originally compiled under FORTRAN IV and 
ran correctly.  The problem seems to be in the read statements.  When
I dimension the arrays to be read, the subroutine compiles.  I need to
know how to dimension these arrays so that I don't have to go through
a lengthy debug (the error occurs in several subroutines).

The subroutine:


      SUBROUTINE EMID (ID,MASS,NUMNP,NEQB)                              EMID0001
      IMPLICIT REAL*8(A-H,O-Z)                                          EMID0002
C                                                                       EMID0003
C     CALLED BY?  HISTRY                                                EMID0004
C                                                                       EMID0005
      DIMENSION ID(NUMNP,6),MASS(NEQB)                                  EMID0006
C                                                                       EMID0007
      REWIND 3                                                          EMID0008
      REWIND 8                                                          EMID0009
      READ (8) ID                                                       EMID0010
      L=1                                                               EMID0011
      DO 200 N=1,NUMNP                                                  EMID0012
      DO 100 I=1,6                                                      EMID0013
   50 MASS(L)=0                                                         EMID0014
      IF(ID(N,I).LE.0) GO TO 100                                        EMID0015
      IF(L.LE.NEQB) GO TO 75                                            EMID0016
      WRITE (3) MASS                                                    EMID0017
      L=1                                                               EMID0018
   75 IF(I.GT.3) GO TO 90                                               EMID0019
      MASS(L)=I                                                         EMID0020
   90 L=L+1                                                             EMID0021
  100 CONTINUE                                                          EMID0022
  200 CONTINUE                                                          EMID0023
      DO 300 I=L,NEQB                                                   EMID0024
  300 MASS(I)=0                                                         EMID0025
      WRITE (3) MASS                                                    EMID0026
C                                                                       EMID0027
      RETURN                                                            EMID0028
      END                                                               EMID002


    Thanks in advance for any response.         Scott.

    ...uunet!harris.cis.ksu.edu!hcx!sas3

    scott stuff, university of arkansas, fayetteville
    college of mechanical engineering.