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

Home » Public Forums » archive » Re: read multiple files with varying names
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: read multiple files with varying names [message #66640 is a reply to message #66601] Fri, 29 May 2009 08:54 Go to previous messageGo to previous message
sophie.hoss is currently offline  sophie.hoss
Messages: 5
Registered: May 2009
Junior Member
On 29 Mai, 15:22, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> It may be you have to do some "conditioning" of your data files before
>> you try to read them.
>
> A simple test would be to read all the lines in your file
> as a string array, and then see if any of the strings were
> blank:
>
>    file = 'datafile.dat'
>    rows = File_Lines(file)
>    data = StrArr(rows)
>    OpenR, lun, file, /Get_Lun
>    ReadF, lun, data
>    Free_lun, lun
>    I = Where( data EQ "", count)
>    IF count GT 0 THEN Print, "I got trouble!!"
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

David, that was also my first guess, so i took a look at the .dat-file
(opened it in an editor) and it seems to me as if the last line was
indeed empty (cursor can be placed into the last line which is empty).
then I did the conditioning, but it says there is no "empty" lines
(count = 0).
however, i think i made it work now - at least that's what my tired
brain thinks.
I'll take a closer look into this after the weekend.
bye everybody
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Am I having a blackout?
Next Topic: How to extract latitude and longitude information from HDF file?

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

Current Time: Fri Oct 10 02:46:53 PDT 2025

Total time taken to generate the page: 0.48169 seconds