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

Home » Public Forums » archive » Re: text file extraction without knowing anything
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: text file extraction without knowing anything [message #78042] Wed, 19 October 2011 13:52
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 10/19/11 1:54 PM, kisCA wrote:
> Hi there,
>
> I have this file containing text and numbers for a month of
> measurements I need to extract but the number of lines with the values
> I need is not regular. So how can I manage to initialize an array I
> don't know the size ?
>
> To describe the pattern:
>
> line 1: header with the date I need
> line 2-5: header with quantity and unit
> line 6-don't know: values
> then 26 lines with text
>
> Thank you
>
> Cheers

The FILE_LINES routine will tell you the number of total lines in the
file, n -- so the number of lines with values should be n - 5 - 26.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
Re: text file extraction without knowing anything [message #78043 is a reply to message #78042] Wed, 19 October 2011 13:13 Go to previous message
Brian Wolven is currently offline  Brian Wolven
Messages: 94
Registered: May 2011
Member
I'd start by looking at the documentation for read_ascii.pro and see if that will do what you need.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: text file extraction without knowing anything
Next Topic: ENVI evf File Format

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

Current Time: Wed Oct 08 20:05:35 PDT 2025

Total time taken to generate the page: 0.01863 seconds