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

Home » Public Forums » archive » readf help!
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 help! [message #47516] Tue, 14 February 2006 08:35
vorticitywolfe is currently offline  vorticitywolfe
Messages: 19
Registered: January 2006
Junior Member
Hello,

I need a little help with the readf procedure. I have a few large data
files that I am trying to make run faster by reading directly from the
file into variables rather than reading them as a string and splitting
them eventually placing them into their representative files; however,
I'm running into a problem with converting the time which is in seconds
since 1970 to a long #... I've tried numerous format codes and none
have been successful. My data simplified data file is as follows:

001,1137369600,0000000,00.00,00002.22,-00.3,009.3,09.4*27AE
001,1137369601,0000000,00.00,00002.22,-00.3,009.2,09.4*9AA9
001,1137369602,0000000,00.00,00002.32,-00.3,009.3,09.4*1DA3

My program looks like this:

openr, lun, fname, /GET_LUN
for i=0l, vs-1 do begin
readf, lun, a,b,c,d,e,f,g,h
print,a,long(b),c,d,e,f,g,h
endfor
FREE_LUN, lun
end

My output looks like this:
1.00000 1137369600 0.000000 0.000000 2.22000
-0.300000 9.30000 9.40000
1.00000 1137369600 0.000000 0.000000 2.22000
-0.300000 9.20000 9.40000
1.00000 1137369600 0.000000 0.000000 2.32000
-0.300000 9.30000 9.40000

See how the seconds do not increment, but everything else does. This
leads me to believe that it is something wrong with the formatting. Can
anyone help or explain how to overcome this? Thanks! Jon
[Message index]
 
Read Message
Previous Topic: Re: Multiple Axes
Next Topic: cmlib

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

Current Time: Wed Oct 08 15:19:51 PDT 2025

Total time taken to generate the page: 0.00426 seconds