Created
April 21, 2018 09:11
-
-
Save pozdneev/1c8637266cd131d3df84e0d095233097 to your computer and use it in GitHub Desktop.
(De)serialization of Fortran basic data types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program uio | |
real :: a(10), b(12) | |
a(:) = 1 | |
b(:) = 2 | |
open(37, file='uio.bin', form='unformatted') | |
write(37) a, b | |
close(37) | |
open(37, file='uio.bin', form='unformatted') | |
read(37) a, b | |
close(37) | |
print *, a | |
print *, b | |
end program uio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment