Changeset 223 for trunk/SRC/Utilities/xfile.pro
- Timestamp:
- 03/14/07 18:13:39 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/xfile.pro
r163 r223 4 4 ;+ 5 5 ; 6 ; @file_comments 6 ; @file_comments 7 7 ; display in a widget an ASCII file. 8 ; It is the same thing that xdisplayfile but here, we use it 9 ; to display the content of a procedure or of a function, 8 ; It is the same thing that xdisplayfile but here, we use it 9 ; to display the content of a procedure or of a function, 10 10 ; even if it is not in the current directory (thanks to the path). 11 11 ; 12 ; @categories 12 ; @categories 13 13 ; Utilities 14 14 ; 15 ; @param FILENAME {in}{required} 16 ; It is the name of the procedure or of the function 15 ; @param FILENAME {in}{required} 16 ; It is the name of the procedure or of the function 17 17 ; we want to display (with or without .pro at the end). 18 18 ; 19 ; @keyword _EXTRA 19 ; @keyword _EXTRA 20 20 ; used to pass your keywords 21 21 ; 22 ; @examples xfile,'plt' 22 ; @examples 23 ; IDL> xfile,'plt' 23 24 ; 24 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 25 ; 7/1/99 26 ; 6/7/1999: compatibility mac and windows 25 ; @history 26 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 27 ; 7/1/99 28 ; 6/7/1999: compatibility mac and windows 27 29 ; 28 ; @version $Id$ 30 ; @version 31 ; $Id$ 29 32 ; 30 33 ;- … … 38 41 pfile = strlowcase(filename) 39 42 ; 40 ; we have to find the full name. 43 ; we have to find the full name. 41 44 ; 42 if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" 45 if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro" 43 46 thisOS = strupcase(strmid(!version.os_family, 0, 3)) 44 47 CASE thisOS of … … 56 59 i = 0 57 60 repeat begin 58 res = findfile(pfile[i]) 61 res = findfile(pfile[i]) 59 62 i = i+1 60 endrep until res[0] NE '' OR i EQ n_elements(pfile) 63 endrep until res[0] NE '' OR i EQ n_elements(pfile) 61 64 if res[0] NE '' then BEGIN 62 65 ; we open the file in a widget 63 66 xdisplayfile, pfile[i-1], _extra = ex 64 ENDIF ELSE ras = report(' le fichier demande n''existe pas...')67 ENDIF ELSE ras = report('file does not exist ...') 65 68 ; 66 69 ;
Note: See TracChangeset
for help on using the changeset viewer.