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

I write a number in a file and read 0 at the beginning.

jpprieto
Beginner
623 Views
Hello, I continue with the problem:
I write some numbers in a file with
...
if (icomp.eq.0) then
open(11,file='ic_deltab',form='unformatted')
else if (icomp.eq.2) then
...
rewind 11
write(11) np1,np2,np3,dx,x1o+xoff,x2o+xoff,x3o+xoff,
& astart,omegam,omegav,h0
...
And when I read the number with
...
open(11,file='ic_deltab',status='old',form='unformatted')
rewind 11
read(11) np1,np2,np3,np4
close(11)
...
I read 0 np1 np2 np3.
For example if I write 10, 20, 30 I read 0 10 20 30.
Some clues?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
623 Views
Again, please show us a complete program and not an excerpt.
0 Kudos
Reply