Re: text file extraction without knowing anything [message #78042] |
Wed, 19 October 2011 13:52 |
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
|
|
|
|