Ignore:
Timestamp:
07/07/06 11:57:27 (18 years ago)
Author:
navarro
Message:

english and nicer header (1)

File:
1 moved

Legend:

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

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:routine_name,remonte 
    65; 
    7 ; PURPOSE:retourne le nom de la routine (procedure ou function) ds 
    8 ; lequel on se trouve 
     6; @file_comments  
     7; Give us the name of the routine (procedure or function) where we are. 
    98; 
    10 ; CATEGORY:utilitaire 
     9; @categories utilities 
     10;  
     11; @param pilingnum {in}{optional} A whole number which give us how many level we have to reascend  
     12;                in the piling up of routines and subroutines to find the looked for routine. 
    1113; 
    12 ; CALLING SEQUENCE:res=routine_name([remonte]) 
    13 ;  
    14 ; INPUTS: remonte: un entier qui donne de combien de niveau on doit 
    15 ; remonter ds l''empillement des routines ewt sous-routines pour 
    16 ; retrouver le nom de la routine cherchee 
    1714; 
    18 ; KEYWORD PARAMETERS: 
     15; @returns a string giving either the full name of the routine (with the path) or '$MAIN$' 
    1916; 
    20 ; OUTPUTS:un string donnant soit le nom de la routine en entier (avec 
    21 ; le path) soit '$MAIN$' 
     17; @restriction This function use the keyword OUTPUT in help.pro and it is specified  
     18;              in the online help that the return syntax of this word can change in  
     19;              function of the version of the code. This version works with IDL 5.2. 
    2220; 
    23 ; COMMON BLOCKS: 
    24 ; 
    25 ; SIDE EFFECTS: 
    26 ; 
    27 ; RESTRICTIONS: 
    28 ;   cette fonction utilise le mot cle OUTPUT ds help.pro et il est 
    29 ;   specifie ds l''aide en ligne que la syntaxe du retour de ce mot cle 
    30 ;   peut changer suivant la version du code. Cette version marche avec 
    31 ;   IDL 5.2 
    32 ; 
    33 ; EXAMPLE: 
    34 ; 
    35 ;  IDL> print, routine_name() 
     21; @example IDL> print, routine_name() 
    3622;  /usr1/com/smasson/IDL_RD/UTILITAIRE/report.pro 
    3723;  IDL> print, routine_name(1) 
     
    4430;  $MAIN$ 
    4531; 
    46 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     32; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    4733;                      21/10/1999 
     34; 
     35; @version $Id$ 
     36; 
    4837;- 
    4938;------------------------------------------------------------ 
    5039;------------------------------------------------------------ 
    5140;------------------------------------------------------------ 
    52 FUNCTION routine_name,  remonte 
     41FUNCTION routine_name,  pilingnum 
    5342; 
    5443; 
     
    5645; 
    5746  help,  /traceback, output = name 
    58   name = strtrim(name, 1)     ; on enleve les blancs en debut de ligne 
    59 ; on va mettre les elements du vecteur bout a bout pour former un 
    60 ; unique sring 
     47  name = strtrim(name, 1)       ; we remove blanks at the beginning of lines and  
     48;                               we put elements of the vector stuck ones with  
     49;                               each others to make an unique string. 
    6150  allnames = '' 
    6251  for i = 0, n_elements(name)-1 do allnames = allnames+name[i] 
    6352; 
    64   name = str_sep(allnames, '%') ; on le redecoupe  
    65   name = strtrim(name, 2)     ; on eleve les blancs devant et derriere 
    66   name = strcompress(name)      ; on compresse les blancs 
    67 ; on ne retient pas les 2 premiers elements qui sont 1  un vide et la 
    68 ; ligne concernant routine_name  
     53  name = str_sep(allnames, '%') ; we cut it out again.  
     54  name = strtrim(name, 2)     ; we remouve blanks in front of and behind 
     55  name = strcompress(name)      ; we compress blanks 
     56; we do not hold back the two first elements who are a blanck  and the line concerning  
     57; routine_name.  
    6958  name = name[2: n_elements(name)-1] 
    70 ; on choisit la ligne qui nous concerne 
    71   if NOT keyword_set(remonte) then remonte = 0 
    72   if remonte GE n_elements(name) then return,  '$MAIN$' 
    73   name = name[remonte] 
     59; we choose the line which concern us. 
     60  if NOT keyword_set(pilingnum) then pilingnum = 0 
     61  if pilingnum GE n_elements(name) then return,  '$MAIN$' 
     62  name = name[pilingnum] 
    7463  if strpos(name, '$MAIN$') NE -1 then return,  '$MAIN$' 
    7564  name = str_sep(name, ' ') 
Note: See TracChangeset for help on using the changeset viewer.