Changeset 118 for trunk/SRC/Utilities
- Timestamp:
- 06/27/06 17:47:06 (18 years ago)
- Location:
- trunk/SRC/Utilities
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/createfunc.pro
- Property svn:keywords set to Id
r97 r118 6 6 ; usefull to avoid the use of execute 7 7 ; 8 ; @param command {in}{required} a scalar string defining the result to be byven back by the function. (see examples) 8 ; @param command {in}{required} a scalar string defining the result to be 9 ; given back by the function. (see examples) 9 10 ; 10 11 ; @keyword FILENAMEIN {in} name of the funccedure to be created. 11 12 ; 'for_createfunc.pro' by default 13 ; 12 14 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 13 15 ; must be included in the function definition. Warning: the string … … 16 18 ; @keyword _EXTRA used to pass your keywords to the created function. 17 19 ; 18 ; SIDE EFFECTS: ends the function name with '.pro' if needed 20 ; @restrictions 21 ; - arguments can be given only through keywords; 22 ; - ends the function name with '.pro' if needed. 19 23 ; 20 ; @restrictions arguments can be given only through keywords 21 ; 22 ; @examples 24 ; @examples 23 25 ; IDL> print, createfunc('3*2', filename='test') 24 26 ; IDL> print, createfunc('3*two', filename = 'test' $ … … 27 29 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 28 30 ; May 2005 31 ; 32 ; @version $Id$ 33 ; 29 34 ;- 30 35 ;------------------------------------------------------------ … … 32 37 ;------------------------------------------------------------ 33 38 FUNCTION createfunc, command, FILENAMEIN = filenamein $ 34 , KWDLIST = kwdlist, _ extra= ex39 , KWDLIST = kwdlist, _EXTRA = ex 35 40 ; 36 41 compile_opt idl2, hidden, strictarrsubs … … 39 44 ; define filename if needed 40 45 if NOT keyword_set(filenamein) then filename = 'for_createfunc.pro' $ 41 ELSE filename = filenamein 46 ELSE filename = filenamein 42 47 ; get the name of the function (not the name of the file containing the function) 43 48 shortfilename = file_basename(filename, '.pro') … … 50 55 ; create the file 51 56 if NOT keyword_set(kwdlist) then kwdlist = '' 52 kwdlist = kwdlist + ', _ extra= ex'57 kwdlist = kwdlist + ', _EXTRA = ex' 53 58 IF strmid(kwdlist, 0, 1) NE ',' THEN kwdlist = ', ' + kwdlist 54 59 putfile, filename, ['function ' + shortfilename + kwdlist $ … … 63 68 cd, old_dir 64 69 ; execute it 65 res = call_function(shortfilename, _ extra= ex)70 res = call_function(shortfilename, _EXTRA = ex) 66 71 ; 67 72 return, res -
trunk/SRC/Utilities/createpro.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r97 r118 5 5 ; @file_comments write an idl procedure, compile it and execute it. 6 6 ; 7 ; @param command {in}{required} a string array defining the procedure to be created. each element will be a line of the created procedure. 7 ; @param command {in}{required} a string array defining the procedure to be created. each element will be a line of the created procedure. 8 8 ; 9 ; @keyword FILENAMEIN name of the procedure to be created.9 ; @keyword FILENAMEIN {in} name of the procedure to be created. 10 10 ; 'for_createpro.pro' by default 11 11 ; 12 ; @keyword KWDLIST a vector string. to specify a list of keywords that12 ; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 13 13 ; must be included in the procedure definition. Warning: the string 14 14 ; must start with a ',' for example: KWDLIST = ', TOTO = toto' 15 15 ; 16 ; @keyword KWDUSED obsolote, please pass directly your keywords through _extra 17 ; 16 18 ; @keyword _EXTRA used to pass your keywords to the created procedure. 17 19 ; 18 ; SIDE EFFECTS: ends the procedure name with '.pro' if needed 20 ; @restrictions 21 ; - is not working with functions, use createfunc instead. 22 ; - arguments can be given only through keywords. 23 ; - ends the procedure name with '.pro' if needed. 19 24 ; 20 ; @restrictions is not working with functions, use createfunc instead. 21 ; arguments can be given only through keywords 22 ; 23 ; @examples 25 ; @examples 24 26 ; IDL> createpro, ['print,''OK'''], filename='test' 25 27 ; IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ 26 ; IDL> , filename = 'test', kwdlist =', ok = ok' 28 ; IDL> , filename = 'test', kwdlist =', ok = ok' 27 29 ; IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ 28 ; IDL> , filename = 'test', kwdlist = ', ok = ok', /ok 30 ; IDL> , filename = 'test', kwdlist = ', ok = ok', /ok 29 31 ; 30 32 ; … … 32 34 ; cleaning + new keywords: October 2005 33 35 ; Feb. 2006: supress keyword "kwdused" and use call_procedure instead of execute 36 ; 37 ; @version $Id$ 34 38 ;- 35 39 ;------------------------------------------------------------ … … 49 53 ; define filename if needed 50 54 if NOT keyword_set(filenamein) then filename = 'for_createpro.pro' $ 51 ELSE filename = filenamein 55 ELSE filename = filenamein 52 56 ; get the name of the procedure (not the name of the file containing the procedure) 53 57 shortfilename = file_basename(filename, '.pro') -
trunk/SRC/Utilities/def_myuniquetmpdir.pro
- Property svn:keywords set to Id
r114 r118 12 12 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 13 13 ; June 2005 14 ; 15 ; @version $Id$ 14 16 ; 15 17 ;- -
trunk/SRC/Utilities/demomode_compatibility.pro
- Property svn:keywords set to Id
r114 r118 2 2 ; @categories utilities 3 3 ; @uses cm_general 4 ; @version $Id$ 4 5 ;- 5 6 PRO demomode_compatibility -
trunk/SRC/Utilities/find.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r118 48 48 ; vector is unique. 49 49 ; 50 ; @keyword _EXTRA used to pass your keywords 51 ; 50 52 ; @file_comments all file_search keywords can be used. 51 53 ; … … 86 88 ; 6/7/1999: compatibilite mac et windows 87 89 ; June 2005: Sebastien Masson: cleaning, use for file_* functions 90 ; 91 ; @version $Id$ 88 92 ;- 89 93 ;------------------------------------------------------------ -
trunk/SRC/Utilities/isadirectory.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r118 16 16 ; @keyword TITLE the title of the window 17 17 ; 18 ; @keyword _EXTRA used to pass your keywords 19 ; 18 20 ; @file_comments all dialog_pickfile keywords (like filter) can be used. 19 21 ; … … 31 33 ; June 28, 2000 32 34 ; June 2005: Sebastien Masson: cleaning, use for file_* functions 35 ; 36 ; @version $Id$ 33 37 ;- 34 38 ;------------------------------------------------------------ -
trunk/SRC/Utilities/isafile.pro
- Property svn:keywords changed from Author Date Id Revision to Id
r114 r118 31 31 ; argument. 32 32 ; 33 ; @keyword _EXTRA used to pass your keywords 34 ; 33 35 ; @file_comments all find, file_search and dialog_pickfile keywords (like title) can be used 34 36 ; … … 52 54 ; 11/2/2000 53 55 ; June 2005: Sebastien Masson: cleaning, use for file_* functions 56 ; 57 ; @version $Id$ 54 58 ;- 55 59 ;------------------------------------------------------------ -
trunk/SRC/Utilities/protype.pro
- Property svn:keywords set to Id
r114 r118 27 27 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 28 28 ; Feb 2006 29 ; 30 ; @version $Id$ 29 31 ;- 30 32 ;------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.