program example2 c c This is a simple example of reading a binary file using routines c from the PPMLIB Library. c character*20 filename real*4 data(100) c c Open a file name "DATA" and assign it to FORTRAN unit 10 c filename = 'DATA' iunit = 10 c call ppm98_binopen( filename, iunit ) c c read the contents of the file into the 100 elements of c the array array "data". c nbytes = 100 * 4 call ppm98_binread( iunit, data(1), nbytes ) c c Display the contents of data c write(6,50) 50 format(' I SQRT(I)',/, '---------------') do i=1,100 write(6,100) i,data(i) enddo 100 format(1h ,i4,1x,f9.6) c c close the file c call ppm98_binclose( iunit ) stop end c endprogram example2