Changeset 269
- Timestamp:
- 08/27/07 11:46:41 (17 years ago)
- Location:
- trunk/SRC/Utilities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/createfunc.pro
r243 r269 26 26 ; 27 27 ; @examples 28 ; IDL> print, createfunc('3*2', filename='test')29 ; IDL> print, createfunc('3*two', filename ='test' $30 ; IDL> , kwdlist ='two = two', two =2)28 ; IDL> print, createfunc('3*2', FILENAMEIN='test') 29 ; IDL> print, createfunc('3*two', FILENAMEIN='test' $ 30 ; IDL> , KWDLIST='two = two', TWO=2) 31 31 ; 32 32 ; @history … … 44 44 compile_opt idl2, hidden, strictarrsubs 45 45 ; 46 IF n_elements(command) NE 1 THEN stop 46 usage="result=createfunc(command, FILENAMEIN=filenamein , KWDLIST=kwdlist, _EXTRA=ex)" 47 ; 48 IF n_elements(command) NE 1 THEN BEGIN 49 dummy = report(['Input parameter command empty', $ 50 'Usage : ' + usage]) 51 stop 52 ENDIF 47 53 ; define filename if needed 48 54 if NOT keyword_set(filenamein) then filename = 'for_createfunc.pro' $ -
trunk/SRC/Utilities/createpro.pro
r243 r269 29 29 ; 30 30 ; @examples 31 ; IDL> createpro, ['print,''OK'''], filename='test'31 ; IDL> createpro, ['print,''OK'''], FILENAMEIN='test' 32 32 ; IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ 33 ; IDL> , filename = 'test', kwdlist=', ok = ok'33 ; IDL> , FILENAMEIN='test', KWDLIST =', ok = ok' 34 34 ; IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ 35 ; IDL> , filename = 'test', kwdlist= ', ok = ok', /ok35 ; IDL> , FILENAMEIN='test', KWDLIST= ', ok = ok', /ok 36 36 ; 37 37 ; @history … … 52 52 IF keyword_set(kwdused) THEN BEGIN 53 53 dummy = report(['keyword KWDUSED has been suppressed,' $ 54 , 'please pass directly your keywords through _ extra,' $54 , 'please pass directly your keywords through _EXTRA,' $ 55 55 , 'see examples in createpro header']) 56 56 return -
trunk/SRC/Utilities/report.pro
r266 r269 99 99 ; If we do not ask any question, we just make a print 100 100 IF NOT keyword_set(question) THEN BEGIN 101 IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': ' 102 if n_elements(text) GT 1 THEN $ 101 IF keyword_set(simple) THEN prefix = '' ELSE BEGIN 102 ; Look for the revsion in the code of the procedure/function calling this 103 ; report function (ie the one where an problem was detected) in the first 104 ; occurence of the form : 105 ; "; $Id$" 106 split=STRSPLIT(routine_name(1), ' ', /EXTRACT) 107 fileroutine=split[1] 108 coderoutine = getfile(fileroutine) 109 idline = where(stregex(coderoutine,'^; \$Id: .* .* .* .* \$', /boolean) EQ 1, cnt1) 110 IF (idline GT 0) THEN BEGIN 111 split=STRSPLIT(coderoutine[idline],' ', /EXTRACT) 112 revision=split[3] 113 prefix = '% '+routine_name(1)+ ' ' + revision + ': ' 114 ENDIF ELSE BEGIN 115 prefix = '% '+routine_name(1)+': ' 116 ENDELSE 117 ENDELSE 118 IF n_elements(text) GT 1 THEN $ 103 119 for i = 0, n_elements(text)-2 do print, prefix+text[i] 104 print, prefix+text[n_elements(text)-1]105 ENDIF120 print, prefix+text[n_elements(text)-1] 121 ENDIF 106 122 107 123 return, res
Note: See TracChangeset
for help on using the changeset viewer.