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

Home » Public Forums » archive » Read ASCII
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: read ascii [message #63628 is a reply to message #10591] Mon, 17 November 2008 02:55 Go to previous messageGo to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
file_lines() is very useful in this situation - then you can avoid all
that looping and EOF stuff. The next problem is that when you read a
string it takes the whole line - not just the part that looks like a
string to you. So the error comes when you try to read the time and
it's at the start of a new line. I'd start like this:

n=file_lines('test.dat')
s=strarr(n)
openr,1,'test.dat'
readf,1,s
close,1

and then chop up the lines with strmid() and convert to the types you
need.

cheers,
Greg
[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: idl for solaris
Next Topic: IDL and sqlite

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

Current Time: Sat Oct 11 01:23:52 PDT 2025

Total time taken to generate the page: 0.88083 seconds