Changeset 285


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
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Colors/lct.pro

    r260 r285  
    4444  if keyword_set(file) then nametbl = file ELSE nametbl = 'palette.tbl' 
    4545; look for nametbl file 
    46   nametbl = (find(nametbl, /firstfound, /nopro))[0] 
     46  nametbl = find(nametbl, /firstfound, /nopro) 
    4747  if nametbl NE 'NOT FOUND' then BEGIN 
    4848    if n_elements(ex) NE 0 then $ 
  • trunk/SRC/Colors/newpalette.pro

    r260 r285  
    4242; look for nametbl file 
    4343  namesave = nametbl 
    44   nametbl = (find(nametbl, /firstfound, /nopro))[0] 
     44  nametbl = find(nametbl, /firstfound, /nopro) 
    4545; no file nametbl found, do we create one? 
    4646  if nametbl EQ 'NOT FOUND' then BEGIN 
  • trunk/SRC/Colors/xlct.pro

    r262 r285  
    501501;----------------------------------------------------------------------------- 
    502502   IF N_ELEMENTS(file) GT 0 THEN filename = file ELSE BEGIN 
    503       filename = (find('palette.tbl', /firstfound, /nopro))[0] 
     503      filename = find('palette.tbl', /firstfound, /nopro) 
    504504      if filename EQ 'NOT FOUND' then filename=filepath('colors1.tbl',subdir=['resource', 'colors']) 
    505505   ENDELSE 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro

    r232 r285  
    4040  meshfile = strtrim(meshfile, 2) 
    4141; try to find a .pro file with this name... 
    42   filepro = (find(meshfile[0], /firstfound, /onlypro))[0] 
     42  filepro = find(meshfile[0], /firstfound, /onlypro) 
    4343; if this is an idl batch file or a procedure 
    4444  if filepro NE 'NOT FOUND' THEN BEGIN 
     
    5252    ENDCASE 
    5353  ENDIF ELSE BEGIN 
    54     filenc = (find(meshfile[0], /firstfound, /onlync))[0] 
     54    filenc = find(meshfile[0], /firstfound, /onlync) 
    5555    if filenc EQ 'NOT FOUND' THEN stop 
    5656    listing = 'initncdf, ''' + filenc +'''' 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro

    r243 r285  
    8585    'meshload':BEGIN 
    8686      widget_control, event.id, get_value = filename 
    87       filename = (find(filename[0], /onlypro, /firstfound))[0] 
     87      filename = find(filename[0], /onlypro, /firstfound) 
    8888      if filename EQ 'NOT FOUND' then begin 
    8989        widget_control, event.id, set_value = '' 
     
    150150          meshload = meshload[0] 
    151151          IF meshload EQ '' THEN return 
    152           meshload = (find(meshload[0], /onlypro, /firstfound))[0] 
     152          meshload = find(meshload[0], /onlypro, /firstfound) 
    153153          if meshload EQ 'NOT FOUND' then begin 
    154154            widget_control, meshload_id, set_value = '' 
  • 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.