next up previous contents index
Next: Write on a Up: Examples Previous: Examples

Write EPIO file on a 32-bit computer

 

Floating point numbers are generated and written to unit 20 in the standard EP format using default values. Note the dimension of IBUF(900) to accept the default blocksize of 1800 16-bit units. The user's data is stored in the array A.

      PROGRAM EPEXA1
      DIMENSION IBUF(900),A(300)
      CALL EPINIT
      DO 10  I=1,20
      CALL USER(A,NW)
 C
 C   ROUTINE -USER- HAS STORED NW VALUES IN A TO BE WRITTEN OUT
 C
      CALL EPOUTS(20,3,NW,A,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 (UNIVAC,IBM)
 C
      CALL EPEND(20,IBUF,IERR)
      IF(IERR.NE.0)STOP 2
      STOP
      END


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