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

Home » Public Forums » archive » Re: moving within a 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: moving within a file [message #11058 is a reply to message #11052] Wed, 04 March 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Gerhard D. Rappold (rappold@zedat.fu-berlin.de) writes:

> I'm just a beginner of IDL and want do know how I could read an open
> file (or a part of it) severeal times. If you have openend the file
> (e.g. StrArr(6, 100) to read the file you do:
>
> data = StrArr(6,100)
> readf, data
>
> if you now want to read the 3 colume without starting over and doing the
>
> Free_lun,
> openF, lun, etc.
> again.
> How can you do it?

If you just want to "rewind" the file (or go some other place
in it), you can use the POINT_LUN procedure. For example, if
you want to rewind a file to its beginning, you can type this:

Point_Lun, lun, 0

If what you are asking is how do you read the 3rd column in
that 6 by 100 string array, then I would do it like this:

col3 = Reform(data[2,*])

You can find other tips about reading and writing data in
IDL on my web page.

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: backing store
Next Topic: Re: functions considered as variables

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

Current Time: Sun Nov 30 13:17:22 PST 2025

Total time taken to generate the page: 0.47977 seconds