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

Home » Public Forums » archive » Re: idl readf error
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: idl readf error [message #65126 is a reply to message #65124] Fri, 13 February 2009 15:04 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rollo.tomasi@hotmail.com writes:

> Thanks for replying! I changed the format to (2A2, 3G7.2) and even
> (2A2, G7.2, G7.2, G7.2), but I get the same error: "Type conversion
> error: Unable to convert given STRING to Float."
>
> There aren't any header lines or column labels in my input file. I
> actually use the script for 3 columns every week to do system
> performance reports, but I can't seem to add the extra columns without
> getting this error.
>
> Maybe it is something trivial I am overlooking? I don't mind changing
> the script altogether if someone suggests a different approach.

Maybe you could post the first five lines of your file
for us:

openr, 1, 'yourfile.txt'
h = strarr(5)
readf, 1, h
close, 1
for j=0,4 do print, h[j]

You could also try using ReadCol from the NASA Astronomy
Library, or even READ_BINARY from IDL, although you would
think this would be so simple you wouldn't need any fancy
programs. :-)

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: happy 1234567890 day!
Next Topic: Reading multiple ASCII files in as 2d arrays and putting them into a 3d array

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

Current Time: Sun Oct 12 01:01:36 PDT 2025

Total time taken to generate the page: 0.39942 seconds