Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Unformatted file write and read

$
0
0

Hi All,

I am trying to write unformatted file. However, the binary file size is always 1kb. Hence, I feel it is not writing the file correctly.

 What is the error in this piece of code ?

      inquire(file="../coords_bin", exist=exist)
        if (exist) then

         open(99,file="../coords_bin",status='old',
     *      action='write', form='unformatted', access='seqential'
     *     )

        else
          open(99,file="../coords_bin",status='new',action='write',
     *            form='unformatted',access='seqential')

        end if

        write(6,*), JLTYP,NOEL,NPT,COORDS(iLoadDIR) !ascii file
        WRITE(99) JLTYP,NOEL,NPT,COORDS(iLoadDIR)   !binary file


        close(99)
        

 

Thanks !

 

 


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>