comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » readf,1,format= ......
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
readf,1,format= ...... [message #57392] Sat, 08 December 2007 13:18 Go to previous message
woopik is currently offline  woopik
Messages: 18
Registered: September 2007
Junior Member
hi

i have a question
i have in a txt file some data
48883 149.55579541 12.44483936
.... .... ....
when i read a entire line
line=''
readf,1,line
print,line
i get a good output
48883 149.55579541 12.44483936

but when i read data like this
ttab = MAKE_ARRAY(nlines,3,/DOUBLE)
...
FMTp='(I5,2X,D13.8,2X,D13.8)'
for i=1,nlines do begin
READF,1,FORMAT=FMT,l1,l2,l3
ttab[i-1,0]=l1 & ttab[i-1,1]=l2 & ttab[i-1,2]=l3
endfor
and i print them
print,FORMAT=FMTp,ttab[0,0], ttab[0,1],ttab[0,2]
i get
48883 149.55580139 12.44483948
and this is not the same it should be
48883 149.55579541 12.44483936

why ?
i use idl 6.1 6.2
Wojtek
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Readf
Next Topic: PLOT x and y ranges

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:18:46 PDT 2025

Total time taken to generate the page: 1.11888 seconds