DanRRight
Joined: 10 Mar 2008 Posts: 2866 Location: South Pole, Antarctica
|
Posted: Sun Jul 21, 2024 11:54 pm Post subject: STREAM files |
|
|
All binary files of existing Fortran compilers become readable and inter-compatible if you declare them as STREAM files. FTN95 understands gFortran, gFortran understands iFort etc. And you get smaller size than text/HDF/SDF/any other file formats and I/O super-speed. But how about other languages?
How to open file in C/C++ so that it will be STREAM file compatible with Fortran STREAM file? In Fortran we just specify access as STREAM when you OPEN file and all is done, everything else in your code is unchanged:
Code: | OPEN (UNIT=fileUnit, FILE=fileName, FORM='UNFORMATTED', STATUS='unknown', ACCESS='STREAM', iostat=errcode) |
I asked Google "How to create STREAM file in C" and its AI opened me the whole lesson on several pages: "In C, you don't explicitly create a "STREAM" file. Instead, you work with streams.... ". What, Google just misunderstood my request and i will need to do 100 steps to recreated file with STREAM properties from regular binary file? |
|