Changeset 285 for trunk/SRC/Utilities


Ignore:
Timestamp:
09/14/07 13:05:09 (17 years ago)
Author:
smasson
Message:

allways return back a scalar is /firstfound used

Location:
trunk/SRC/Utilities
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Utilities/find.pro

    r280 r285  
    2020; 
    2121; @keyword FIRSTFOUND 
    22 ; activate this keyword to stop looking for the file as soon as we found one. 
     22; activate this keyword to stop looking for the file as soon as we 
     23; found one. Return a scalar string containing the first file found 
    2324; 
    2425; @keyword IODIRECTORY {type=scalar string or array of strings} {default=['.',!path]} 
     
    164165    ENDIF ELSE found = file_search(dir + '/' + base, _extra = ex) 
    165166    IF found[0] NE '' THEN BEGIN 
    166       IF keyword_set(firstfound) THEN BEGIN 
    167         IF keyword_set(unique) THEN return, found[uniq(found, sort(found))] $ 
    168         ELSE return, found 
    169       ENDIF 
     167      IF keyword_set(firstfound) THEN return, found[0] 
    170168      fileout = [fileout, found] 
    171169    ENDIF 
  • trunk/SRC/Utilities/protype.pro

    r242 r285  
    4040  compile_opt idl2, strictarrsubs 
    4141; 
    42   filepro = (find(file[0], /onlypro, /firstfound))[0] 
     42  filepro = find(file[0], /onlypro, /firstfound) 
    4343  if filepro EQ 'NOT FOUND' then return, -1 
    4444  name = file_basename(filepro, '.pro') 
  • trunk/SRC/Utilities/xfile.pro

    r266 r285  
    6565; 
    6666; find the file and display it! 
    67    pfile = find(filename, /first_found) 
     67   pfile = find(filename, /firstfound) 
    6868   if (pfile NE 'NOT FOUND') then begin 
    6969     xdisplayfile, pfile[0], _EXTRA = ex 
  • trunk/SRC/Utilities/xhelp.pro

    r266 r285  
    6868; 
    6969; find the file and display it! 
    70    pfile = (find(filename, /first_found))[0] 
     70   pfile = find(filename, /firstfound) 
    7171; read it 
    7272   IF (pfile NE 'NOT FOUND') THEN BEGIN 
Note: See TracChangeset for help on using the changeset viewer.