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

Home » Public Forums » archive » Re: Reading data from file
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: Reading data from file [message #9613] Wed, 23 July 1997 00:00
wonko is currently offline  wonko
Messages: 22
Registered: March 1997
Junior Member
ncw@dl.ac.uk (Neil Winrow) wrote:

> I need to read data from a file I open as part of my progam. The
> problem is the data I need to read is on a specific line and column of
> the data file and I can't seem to read the correct column. I have seen
> the 'TL' function for reading formatted data, but can't seem to use
> it. The idea is to search down so many lines and then across so many
> columns, and read the next three columns of integer values. If anyone
> understands my problem can they help.

I doubt I understand you right... anyway, what about this:

openr, unit, filename, /get_lun
line = intarr( number_of_columns )
repeat begin
readf, unit, line
endrep until ( found_the_right_line or eof( unit ) )
free_lun, unit

This works only if every line consists of the same number of integer
values. Maybe this is not the case? Do you know in which row your data
is? Then you could just skip some lines:

dummy = ''
for i = 1, number_of_lines do readf, unit, dummy

Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
[Message index]
 
Read Message
Previous Topic: addressing array under different names?
Next Topic: IDL 5.0 forgets about open windows (?)

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

Current Time: Sat Oct 11 01:30:45 PDT 2025

Total time taken to generate the page: 0.47801 seconds