Hi All!
I am going out of head reading a formatted text file, it should not be a problem, but I am having strange issues:
this is the file test ( I add a ruler ) I need to read the underlined value:
AAA 2921.5 0.0000000.296018145670195E+08..............................
----+----0----+----0----+----0----+----0----+----0----+----0......
AND THIS IS THE CODE
a=0.00000000000000000000000E00
e=0.00000000000000000000000E00
i=0.00000000000000000000000E00
omega=0E00
frase=''
frase1=''
readf, 1 , frase1
reads, FORMAT = '(A23, E21.15,D21.15,D21.15,D21.15,D21.15,D21.15 )', frase1, frase, a , e ,i , omega, perigee , mean
a1= double(STRMID(pio, 23 , 21))
print, FORMAT = '(E21.15)' , a
print, FORMAT = '(E21.15)' , a1
If I print the value of a I have:
2.960181400000000E+07 that is completely wrong
While if I print the value of a1 I have the right one, but this way is too tricky
2.960181456701950E+07
I also printed out the:
print, FORMAT = '(E21.15)' , a mod long(a)
and I obtained 0.00 !!
Thank you so much for any explanation!!
Ciao
|