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

Home » Public Forums » archive » Re: FindFile for more than one filetype
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: FindFile for more than one filetype [message #28571] Fri, 21 December 2001 09:41 Go to previous message
James Kuyper Jr. is currently offline  James Kuyper Jr.
Messages: 10
Registered: November 2001
Junior Member
Sue wrote:

> "Richard Tyc" <richt@sbrc.umanitoba.ca> wrote in message news:<9vtjoa$mmt$1@canopus.cc.umanitoba.ca>...
>
>>> for yr = 1981, 2000 do begin
>>>
>>
>> How about something real simple like this to replace AND:
>>

>> filelist = FINDFILE(outpath + string(yr, FORMAT = '(I4.4)')
>> + '*'+ '_average.int', COUNT=filecount)
>> if filecnt NE 1 then break;

Change to:

if filecount NE 1 then break;
totalcnt = filecount

>>
>> filelist = [ filelist, FINDFILE(outpath + string(yr+1, FORMAT = '(I4.4)')
>> + '*'+ '_average.int', COUNT=filecount) ]
>> if filecnt NE 1 then break;

Change to:

if filecount NE 1 then break;
totalcnt = totalcnt + filecount;

>>
>>
>>> endfor
>>
>> Rich
>
> ---------
> I tried this and for some reason the filecount still equals 1, instead
> of 2. Interestingly enough, when I print filelist...I do get two
> files. Any ideas?
> --Sue

With the given changes, filecount will still be 1, but totalcnt will now
have the value of 2, as you expected.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Pointer syntax and IDL 4.0: summary
Next Topic: Wiener filter

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

Current Time: Wed Oct 08 14:57:11 PDT 2025

Total time taken to generate the page: 0.00219 seconds