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

Home » Public Forums » archive » End of Array - like - End Of File
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: End of Array - like - End Of File [message #26283 is a reply to message #25952] Mon, 20 August 2001 00:46 Go to previous messageGo to previous message
weitkamp is currently offline  weitkamp
Messages: 33
Registered: October 1998
Member
Reimar's suggestion of using the COUNT keyword to FINDFILE is indeed
*much* better than using N_ELEMENTS, because the latter will result in
an error when the file list is empty (unless you use an additional
line to catch that situation). The reason is that when FINDFILE finds
no matches, its return value is a scalar null string, and N_ELEMENTS()
of that is one (not zero).

Reimar Bauer <r.bauer@fz-juelich.de> wrote in message news:<3B7FF5BE.526BE6@fz-juelich.de>...
> "Emmler, Oliver" wrote:
>>
>> Hi all,
>> i have a directory with different numbers of files. I read the filenames by
>>
>> text = FINDFILE('H:/radiologie/*.dcm')
>
> you should use the count keyword of findfile
>
> Result = FINDFILE( File_Specification [, COUNT=variable] )
>
> FOR i=0,count-1 do ...
>
> regards
> Reimar
>
> --
> Reimar Bauer
>
> Institut fuer Stratosphaerische Chemie (ICG-1)
> Forschungszentrum Juelich
> email: R.Bauer@fz-juelich.de
> http://www.fz-juelich.de/icg/icg1/
> ============================================================ ======
> a IDL library at ForschungsZentrum Juelich
> http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
>
> http://www.fz-juelich.de/zb/text/publikation/juel3786.html
> ============================================================ ======
>
> read something about linux / windows
> http://www.suse.de/de/news/hotnews/MS.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Video for Windows, Clear text in Object Graphics and a genetic algorithm
Next Topic: Re: Puzzle with floating point underflow

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

Current Time: Sun Oct 12 10:43:54 PDT 2025

Total time taken to generate the page: 1.12001 seconds