Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29429 Discussions

Read VB/Pascal generated binary files in Fortran

mohanmuthu
New Contributor I
744 Views

Dear All,

I use the binary files generated by VB/Pascal in my fortran application. Currently I am converting it to ASCII format and read in Fortran. However, it takes lot of time in converting and reading. I understand, fortran's binary storage format is different from VB/Pascal. Is there anyway, Fortran can read it directly?

0 Kudos
2 Replies
Steven_L_Intel1
Employee
744 Views

What is VB/Pascal? I know VB and I know Pascal but I can't put the two together.

Fortran can handle any kind of binary format if you know what the file structure is. If you open the file FORM='UNFORMATTED',ACCESS='STREAM', you will just be reading bytes of data with no interpretation or record structure.

Can you attach a ZIP of a sample data file and tell us what it is supposed to represent (layout of floats, integers. etc.) and the values, and we can tell you how to read this in Fortran.

0 Kudos
mohanmuthu
New Contributor I
744 Views

Thanks a lot Steve. It works perfectly. I missed the specifier ACCESS='STREAM' and that caused all the issues.

I meant VB or Pascal.

0 Kudos
Reply