I never got the binary version to work. Upgraded to 4.9 but still nada.
Brooks
Try this...
real(10)::a0(10), a1(10), a2(10)
real(10):: r(3,10,100)
open(unit=#,...)
write(unit=#) A0
write(unit=#) A1
write(unit=#) A2
write(unit=#) r
close (#)
...
open(unit=#,...)
read(unit=#) a0
read(unit=#) a1...
Did the first. When I posted this originally I made sure I could create the file. That is why I entitled the post as 'Write works but Read doesn't'. The only way I can get it to work is with rec=### in the read/write statements.
Brooks
salgerman,
I tried that but got:
Input file = C:\Users\TCS\Desktop\Pearson\MyTest.dat
At line 87 of file Ranf.f95 (unit = 4, file = 'C:\Users\TCS\Desktop\Pearson\MyTe
st.dat')
Fortran runtime error: End of file
I've written binary data out but can't seem to read it.
Subroutine RanfPut ( fname )
Character(45),intent(in):: fname
Integer:: i, ok
open ( unit=4,file=fname,iostat=ok,form='unformatted', &
status='replace',position='rewind',access=sequential' )
If (ok > 0) Then...
Does anybody know how to use format codes to write into a single place on the screen in order to get something that looks like clock hands? I know to use the characters -,\,|,/ to get the desired effect but I need to write them in the same location to get the effect that something is being...
You need to remember that Fortran and C store matrices in different orders. C can have two different ways to do a matrix. (1) vect(3)->matrix(3,3) or vect(3)->vect(3)->vect(3). Each entry in the first two vects are pointers. (2) matrix(3,3,3) but it is stored differently than Fortran.
BrooksVH
The link step with f95 is:
D:\Booster>g95 -o bdp.exe bdp.o -I d:\booster -L d:\boosterMyLib D:\MinGW\Disl
in\dismg.a -luser32 -lgdi32
bdp.o:bdp.f95:(.text+0x29): undefined reference to `setearthdata_'
bdp.o:bdp.f95:(.text+0x2e): undefined reference to `setboostdata_'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.