Changeset 266
- Timestamp:
- 08/24/07 14:27:48 (17 years ago)
- Location:
- trunk/SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/level2mask.pro
r231 r266 9 9 ; 10 10 ; @param TAB {in}{required}{type=2d array} 11 ; 2d level array of sill level (or a structure respecting litchamp criterions) 11 ; 2d level array of sill level (or a structure respecting <pro>litchamp</pro> 12 ; criterions) 12 13 ; 13 14 ; @returns … … 20 21 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 22 ; 17/6/1999 22 ; Se tp2004: boundary level have 0 values and not 1 (as it was23 ; Sept 2004: boundary level have 0 values and not 1 (as it was 23 24 ; explained before in the header). see: 24 25 ; print, array_equal(niveau, total(level2mask(niveau),3)) 25 ;26 26 ; 27 27 ; @version -
trunk/SRC/Utilities/report.pro
r260 r266 4 4 ; Like <proidl>DIALOG_MESSAGE</proidl> if there is already some widget 5 5 ; active or like <proidl>MESSAGE</proidl> if there is not any widget active. 6 ; To ask a question whose answer is not yes/no, use xquestion.6 ; To ask a question whose answer is not yes/no, use <pro>xquestion</pro>. 7 7 ; 8 8 ; @param TEXT {in}{required} {type=scalar string or arrays of string} 9 ; If TEXT is a scalar string, we look for the line feed characters "!C" 10 ; comporte qu''un element, on cherche les eventuels caracteres de 11 ; retour a la ligne: '!C'. If text is set to an array of strings, each 9 ; If TEXT is a scalar string, we look for the line feed character "!C". 10 ; If TEXT is set to an array of strings, each 12 11 ; array element is displayed as a separate line of text. 13 12 ; … … 78 77 ; do we ask a question ? 79 78 if keyword_set(question) then BEGIN 80 ; what i sthe answer by default ?79 ; what is the answer by default ? 81 80 if keyword_set(default_no) then answer = 'n' ELSE answer = 'y' 82 81 default_answer = answer … … 90 89 answer = strlowcase(answer) 91 90 ENDWHILE ; 92 ; we adjust res in function of th answer91 ; we adjust res in function of the answer 93 92 case answer of 94 93 '':res = default_answer EQ 'y' -
trunk/SRC/Utilities/xfile.pro
r262 r266 8 8 ; 9 9 ; @categories 10 ; Utilities 10 ; Utilities Widget 11 11 ; 12 ; @param FILENAME {in}{required} 12 ; @param FILENAME {in}{required} {type=scalar string} 13 13 ; It is the name of the procedure or of the function 14 14 ; we want to display (with or without .pro at the end). 15 ; FILENAME should be located in !path. 16 ; ".pro" suffix will be appended if needed. 15 17 ; 16 18 ; @keyword _EXTRA 17 19 ; Used to pass keywords to <proidl>XDISPLAYFILE</proidl> 20 ; 21 ; @restrictions 22 ; Triggers the <proidl>XMANAGER</proidl> if it is not already in use. 18 23 ; 19 24 ; @examples … … 34 39 compile_opt idl2, strictarrsubs 35 40 ; 41 usage="xfile, filename, _EXTRA = ex" 42 ; 43 ; check parameters 44 check_param = N_PARAMS() 45 if (check_param EQ 0) then begin 46 dummy = report(['No input parameter', $ 47 'Usage : ' + usage]) 48 return 49 endif 50 ; 51 ; check arguments 52 if arg_present(filename) then begin 53 dummy = report(['No input parameter filename', $ 54 'Usage : ' + usage]) 55 return 56 endif 57 ; 36 58 ; Are we sure filename is a string? 37 59 intype = size(filename, /type) 38 60 if intype NE 7 then begin 39 dummy = report('Input parameter must be a string and not a '+size(filename, /tname)) 61 dummy = report(['Input parameter filename type : ' + size(filename,/TNAME) , $ 62 'Input parameter filename must be a string']) 40 63 return 41 64 endif 65 ; 42 66 ; find the file and display it! 43 67 pfile = find(filename, /first_found) 44 IF pfile NE 'NOT_FOUND' THEN xdisplayfile, pfile[0], _extra = ex $ 45 ELSE dummy = report(filename + ' does not exist ...') 46 68 if (pfile NE 'NOT FOUND') then begin 69 xdisplayfile, pfile[0], _EXTRA = ex 70 endif else begin 71 dummy = report(['Input parameter filename : ' + filename, $ 72 filename + ' does not exist ...']) 73 endelse 74 ; 47 75 return 48 76 end -
trunk/SRC/Utilities/xhelp.pro
r262 r266 5 5 ; 6 6 ; @categories 7 ; Widget7 ; Utilities Widget 8 8 ; 9 9 ; @param FILENAME {in}{required} {type=scalar string} 10 ; the name of the file to display. 10 ; It is the name of the procedure or of the function 11 ; we want to display (with or without .pro at the end). 11 12 ; FILENAME should be located in !path. 12 13 ; ".pro" suffix will be appended if needed. … … 41 42 compile_opt idl2, strictarrsubs 42 43 ; 43 44 usage="xhelp, filename, _EXTRA = ex" 45 ; 46 ; check parameters 47 check_param = N_PARAMS() 48 if (check_param EQ 0) then begin 49 dummy = report(['No input parameter', $ 50 'Usage : ' + usage]) 51 return 52 endif 53 ; 54 ; check arguments 55 if arg_present(filename) then begin 56 dummy = report(['No input parameter filename', $ 57 'Usage : ' + usage]) 58 return 59 endif 60 ; 44 61 ; Are we sure filename is a string? 45 62 intype = size(filename, /type) 46 63 if intype NE 7 then begin 47 dummy = report('Input parameter must be a string and not a '+size(filename, /tname)) 64 dummy = report(['Input parameter filename type : ' + size(filename,/TNAME) , $ 65 'Input parameter filename must be a string']) 48 66 return 49 67 endif 68 ; 50 69 ; find the file and display it! 51 70 pfile = (find(filename, /first_found))[0] 52 71 ; read it 53 IF pfile NE 'NOT_FOUND' THEN BEGIN72 IF (pfile NE 'NOT FOUND') THEN BEGIN 54 73 fulltext = getfile(pfile) 55 74 ; find the ";+"and ";-" 56 75 start = where(stregex(fulltext,'^ *;\+ *$', /boolean) EQ 1, cnt1) 57 76 ending = where(stregex(fulltext,'^ *;- *$', /boolean) EQ 1, cnt2) 58 IF cnt1 EQ 0 OR cnt1 NE cnt2THEN BEGIN77 IF ((cnt1 EQ 0) OR (cnt1 NE cnt2)) THEN BEGIN 59 78 dummy = report('file '+pfile+' is badly written, no proper header found... Use xfile') 60 79 return … … 74 93 ENDIF 75 94 ENDFOR 76 ; remove the fi srt useless lines77 IF n_elements(header) GT 1 THEN header = header[4:*] ELSE BEGIN 95 ; remove the first useless lines 96 IF n_elements(header) GT 1 THEN header = header[4:*] ELSE BEGIN 78 97 dummy = report('file '+pfile+' has empty header... Use xfile') 79 98 return 80 99 ENDELSE 81 ; 100 ; 82 101 xdisplayfile, 'dummy', text = header[1:*], title = pfile, _extra = ex 83 102 ; 84 ENDIF ELSE dummy = report(filename + ' does not exist ...') 85 103 endif else begin 104 dummy = report(['Input parameter filename : ' + filename, $ 105 filename + ' does not exist ...']) 106 endelse 107 ; 86 108 return 87 109 end 88
Note: See TracChangeset
for help on using the changeset viewer.