Ignore:
Timestamp:
06/27/06 17:47:06 (18 years ago)
Author:
pinsard
Message:

add $ in Calendar, Grid, Interpolation, Obsolete and Postscript *.pro files, add svn:keywords Id to all these files, some improvements in header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Utilities/createfunc.pro

    • Property svn:keywords set to Id
    r97 r118  
    66; usefull to avoid the use of execute 
    77; 
    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) 
    910; 
    1011; @keyword FILENAMEIN {in} name of the funccedure to be created. 
    1112;      'for_createfunc.pro' by default 
     13; 
    1214; @keyword KWDLIST {in} a vector string. to specify a list of keywords that 
    1315;      must be included in the function definition. Warning: the string 
     
    1618; @keyword _EXTRA used to pass your keywords to the created function. 
    1719; 
    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. 
    1923; 
    20 ; @restrictions arguments can be given only through keywords 
    21 ; 
    22 ; @examples  
     24; @examples 
    2325;      IDL> print, createfunc('3*2', filename='test') 
    2426;      IDL> print, createfunc('3*two', filename = 'test' $ 
     
    2729; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2830;                      May 2005 
     31; 
     32; @version $Id$ 
     33; 
    2934;- 
    3035;------------------------------------------------------------ 
     
    3237;------------------------------------------------------------ 
    3338FUNCTION createfunc, command, FILENAMEIN = filenamein $ 
    34                , KWDLIST = kwdlist, _extra = ex 
     39               , KWDLIST = kwdlist, _EXTRA = ex 
    3540; 
    3641  compile_opt idl2, hidden, strictarrsubs 
     
    3944; define filename if needed 
    4045  if NOT keyword_set(filenamein) then filename = 'for_createfunc.pro' $ 
    41   ELSE filename = filenamein  
     46  ELSE filename = filenamein 
    4247; get the name of the function (not the name of the file containing the function) 
    4348   shortfilename =  file_basename(filename, '.pro') 
     
    5055; create the file 
    5156   if NOT keyword_set(kwdlist) then kwdlist = '' 
    52    kwdlist = kwdlist + ', _extra = ex' 
     57   kwdlist = kwdlist + ', _EXTRA = ex' 
    5358   IF strmid(kwdlist, 0, 1) NE ',' THEN kwdlist = ', ' +  kwdlist 
    5459   putfile, filename, ['function ' + shortfilename + kwdlist $ 
     
    6368   cd, old_dir 
    6469; execute it 
    65    res = call_function(shortfilename, _extra = ex) 
     70   res = call_function(shortfilename, _EXTRA = ex) 
    6671; 
    6772   return, res 
Note: See TracChangeset for help on using the changeset viewer.