next up previous contents index
Next: Read Long Block Up: Examples Previous: Write EPIO file

Write on a 60-bit computer

Essentially similar to the previous example, a file is created using all defaults. Note the dimension of IBUF(480).

      PROGRAM EPEXA2
      DIMENSION IBUF(480),IA(300)
      CALL EPINIT
      DO 10  I=1,30
      NW=10*I
      CALL USER(IA,NW)
 C
 C   ROUTINE -USER- HAS STORED NW VALUES IN A TO BE WRITTEN OUT.
 C   .....
      CALL EPOUTS(20,3,NW,IA,IBUF,IERR)
      IF(IERR.NE.0)STOP 1
   10 CONTINUE
 C **********************************************************
 C
 C                 THE FOLLOWING CALL IS ESSENTIAL
 C
 C **********************************************************
      CALL EPCLOS(20,IBUF,IERR)
 C
 C    FOLLOWING CALL ONLY NECESSARY ON SOME COMPUTERS (IBM, UNIVAC)
 C
      CALL EPEND(20,IBUF,IERR)
      IF(IERR.NE.0)STOP 2
      STOP
      END
      SUBROUTINE USER(IA,NW)
      DIMENSION IA(NW)
      DO 5 J=1,NW
      IA(J)=J
  5   CONTINUE
      RETURN
      END


Janne Saarela
Tue May 16 09:44:28 METDST 1995