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/report.pro

    r132 r133  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; NAME:report 
    65; 
    7 ; PURPOSE: comme dialog_message.pro si il y a deja des widgets actives 
    8 ; ou comme message.pro si il n''y a pas de widgets actives. pour poser 
    9 ; des question dont la reponse n''est pas oui/non utiliser xquestion 
     6; @file_comments  
     7; Like dialog_message.pro if there is already some widget  
     8; active or like message.pro if there is not any widget active.  
     9; To ask a question whose answer is not yes/no,use xquestion. 
    1010; 
    11 ; CATEGORY: 
    12 ; 
    13 ; CALLING SEQUENCE:res = report(text) 
    14 ;  
    15 ; INPUTS: text: un string on un vecteur de string. Si le string ne 
     11; @param text {in}{required} un string on un vecteur de string. Si le string ne 
    1612; comporte qu''un element, on cherche les eventuels characteres de 
    1713; retour a la ligne: '!C'. If text is set to an array of strings, each 
    1814; array element is displayed as a separate line of text. 
    1915; 
    20 ; KEYWORD PARAMETERS:  
    21 ;         SIMPLE: activate to print only the message without the name 
     16; @keyword SIMPLE activate to print only the message without the name 
    2217;             and the line of the routine (defined by calling routine_name) 
    2318; 
    24 ; ceux dialog_message.pro et message.pro avec en + 
    25 ; PARENT qui fait la meme chose que DIALOG_PARENT de dialog_message.pro 
     19; @keyword _extra used to pass keywords from dialog_message.pro and message.pro 
    2620; 
    27 ; OUTPUTS: -1 si le mot cle QUESTION n''est pas activer 
    28 ;          si le mot cle est active la fonction retourne 1 pour yes et 
    29 ;          0 pour no. 
     21; @keyword PARENT same as DIALOG_PARENT de dialog_message.pro 
    3022; 
    31 ; COMMON BLOCKS: 
     23; @keyword QUESTION Set this keyword to create a "Question" dialog. 
     24;                   The default dialog type is "Warning" 
    3225; 
    33 ; SIDE EFFECTS: 
     26; @keyword DEFAULT_NO Set this keyword to make the "No" button the default  
     27;                     selection for "Question" dialog. Normally, the default is yes. 
    3428; 
    35 ; RESTRICTIONS: 
     29; @keyword SIMPLE Activate to print the error message without printing  
     30;                 the routine name with its full path. 
    3631; 
    37 ; EXAMPLE: 
     32; @returns -1 if the keyword QUESTION is not activated 
     33;          If the keyword is activated, return 1 for yes and 0 for no. 
    3834;  
    39 ; si aucun widget n''est active: 
     35; @example If there is not any widget activated: 
    4036; 
    4137;     IDL> help, report('toto tata') 
    4238;     % $MAIN$: toto tata 
    4339;     <Expression>    INT       =       -1 
    44 ;     IDL> help, report('ca marche ?',/question) 
    45 ;     ca marche ? y/n (default answer is y) 
     40;     IDL> help, report('does it works ?',/question) 
     41;     does it works ? y/n (default answer is y) 
    4642;     <Expression>    BYTE      =    1 
    47 ;     IDL> help, report('question1: !C ca marche ?',/question) 
     43;     IDL> help, report('question1: !C does it works ?',/question) 
    4844;     question1: 
    49 ;     ca marche ? y/n (default answer is y) 
     45;     does it works ? y/n (default answer is y) 
    5046;     <Expression>    BYTE      =    1 
    5147; 
    52 ; si des widgets sont deja actives, c''est la meme chose mais avec des 
    53 ; widgets! 
     48; If widgets are already activated, it is the same thing but with widgets! 
    5449; 
    55 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 
     50; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 
    5651;                      21/10/1999 
     52; 
     53; @version $ID$ 
     54; 
    5755;- 
    5856;------------------------------------------------------------ 
     
    6361  compile_opt idl2, strictarrsubs 
    6462; 
    65    res = -1                     ; 
    66 ; on separe le texte en differentes lignes (separees par !C) si ce 
    67 ; n''est pas deja fait... 
     63  res = -1                      ; 
     64; we separate the text in different lines (separated by !C) if it is not already done... 
    6865   if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim) 
    69 ; il y a des widgets actifs, c''est facile on appelle dialog_massage 
     66; there is some widgets activated, it is easy, we call dialog_massage 
    7067   if (widget_info(/managed))[0] NE 0 then BEGIN 
    7168      res = dialog_message(text, dialog_parent = parent, QUESTION = question $ 
     
    7370      if keyword_set(question) THEN res = res EQ 'Yes' ELSE res = -1 
    7471   ENDIF ELSE BEGIN 
    75 ; aucun widget n''est actif 
    76 ; on pose une question ? 
     72; there is not any widget activated 
     73; do we ask a question ? 
    7774      if keyword_set(question) then BEGIN 
    78 ; quelle est la reponse par defaut ? 
     75; what i sthe answer by default ? 
    7976         if keyword_set(default_no) then answer = 'n' ELSE answer = 'y' 
    8077         default_answer = answer 
     
    8380         read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 
    8481         answer = strlowcase(answer) ; 
    85 ; si la reponse ne convient pas 
     82; if the answer is not appropriated 
    8683         while answer NE '' and answer NE 'y' and answer NE 'n' do begin 
    8784            read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer 
    8885            answer = strlowcase(answer) 
    8986         ENDWHILE               ; 
    90 ; on ajuste res en fonction de la reponse 
     87; we adjust res in function of th answer 
    9188         case answer of 
    9289            '':res = default_answer EQ 'y' 
     
    9592         endcase 
    9693      endif ELSE BEGIN 
    97 ; si on ne pose pas de question on fait juste un print 
     94; If we do not ask any question, we just make a print 
    9895        IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': ' 
    9996         if n_elements(text) GT 1 THEN $ 
Note: See TracChangeset for help on using the changeset viewer.