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

Home » Public Forums » archive » Re: Simple text file reading question
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: Simple text file reading question [message #56236] Wed, 10 October 2007 08:26 Go to previous message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Oct 10, 11:08 am, Brian Larsen <balar...@gmail.com> wrote:
> I am assuming you have tried this and got this error:
> % READF: Input conversion error. Unit: 101, File: data.txt
> % Execution halted at: $MAIN$
>
> the issue is that you have to initialize read variables to strings if
> you want to read strings.
>
> this is the code I used:
> IDL> openr, lun, 'data.txt', /get_lun
> IDL> readf, lun, in1
> IDL> readf, lun, in2
> IDL> readf, lun, in3
> IDL> in4 = ''
> IDL> readf, lun, in4
> IDL> help, in1, in2, in3, in4
> IN1 FLOAT = 650.000
> IN2 FLOAT = 550.000
> IN3 FLOAT = 480.000
> IN4 STRING = 'chimeny.sav '
>
> Cheers,
>
> Brian
>
> ------------------------------------------------------------ ---------------------
> Brian Larsen
> Boston University
> Center for Space Physics

Thank so much for your help!! It works...my whole program
works...hopefully I won't have to write another one for a while...
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: 3D registration
Next Topic: Minor IDL code changes cause large slowdowns elsewhere in code

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

Current Time: Sat Oct 11 21:34:04 PDT 2025

Total time taken to generate the page: 1.16713 seconds