[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: End of Array - like - End Of File



"Emmler, Oliver" wrote:
> 
> Hi all,
> i have a directory with different numbers of files. I read the filenames by
> 
> text = FINDFILE('H:/radiologie/*.dcm')
> 
> in my testdirectory there are 14 files so it's defined when to stop
> 
>  FOR i=0,14 DO file[*,*,i] = READ_DICOM(text[i])
> 
> QUESTION:
> How can i get the size of the array TEXT to stop by FOR i=0,stop DO ...
> Is there something like EOA (EndOfArray) like EOF ?

How about:

  n_files = N_ELEMENTS( text )
  FOR i=0,n_files-1 DO file[*,*,i] = READ_DICOM(text[i])

?

paulv

-- 
Paul van Delst           A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP        Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274  There shallow draughts intoxicate the brain,
Fax:(301)763-8545        And drinking largely sobers us again.
                                         Alexander Pope.