File I/O Unformatted Stream Vs Binary

File I/O Unformatted Stream Vs Binary

I am not familiar with opening a file with form set to Unformated with Acess set to Stream. Is this identical to opening a file with form set to Binary. If not, since they are record free files would something written with both forms produce the same binary? What would be the pros/cons between them if there is a difference. Right now I am able to postprocess form set to binary with python, but I assume it should work with stream because its equivalent to a C-binary?


Thanks as always.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Yes, it's the same (for unformatted). 'BINARY' is an extension, ACCESS='STREAM' is standard.

Retired 12/31/2016



would produce the same file as:


Assuming all the WRITEs are the same, yes.

Retired 12/31/2016

I've been using FORM='BINARY' for years now with scratch files and a few others. I understand that the introduction of STREAM was at least partly to standardize the way different compilers implemented BINARY, for compatibility reasons. There was one little twist I found; I was using ACCESS="APPEND' in one case,, which is another extension and incompatible with STREAM. Fortunately, the POSITION keyword in OPEN came to the rescue....

Leave a Comment

Please sign in to add a comment. Not a member? Join today