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

Home » Public Forums » archive » reading format data
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 format data [message #6585 is a reply to message #6503] Thu, 11 July 1996 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Hon Yee <yeek@boulder.colorado.edu> wrote:
>
> in my data file there are empty lines. I read data as structures, and
> and empty line gives values of zeros. How can avoid empty lines, or
> ignore them soon i don't have returning zeros. could someone help
> out,please?. Thank in advance.
>

You might try reading the data file as an array of strings,
remove the blank lines, and then read the contents of the
string array into your structure, if that's what you want.

I'm sending you via email a routine called FILE_STRARR.PRO that
reads the contents of a file into a string array. It's written
for UNIX systems, but you could modify if for Mac or PC easily.
Using this, you could say:

string_array = FILE_STRARR( filename )
non_blank = where( string_array ne '' )
if ( non_blank(0) ne -1 ) then $
string_array = string_array( non_blank )

Hope this helps.

Dave Foster
foster@bial1.ucsd.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: cubics & quartics
Next Topic: Resampling large satellite (AVHRR) images to a grid

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

Current Time: Wed Oct 08 19:24:53 PDT 2025

Total time taken to generate the page: 0.00780 seconds