Changeset 374


Ignore:
Timestamp:
08/08/08 17:12:27 (16 years ago)
Author:
pinsard
Message:

improvements of headers (examples and alignments)

Location:
trunk/SRC/ToBeReviewed/STRING
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/STRING/getfile.pro

    r372 r374  
    88; 
    99; @keyword ERROR 
    10 ; =err  error flag: 0=ok, 1=file not opened, 
    11 ; 2=no lines in file. 
     10; error flag: 0=ok, 1=file not opened, 2=no lines in file. 
    1211; 
    1312; @keyword QUIET 
     
    1514; 
    1615; @keyword LINES 
    17 ; =n  Number of lines to read (def=all). 
     16; Number of lines to read (def=all). 
    1817; Much faster if number of lines is known. 
    1918; Automatic for IDL 5.6 or later. 
    2019; 
    2120; @keyword FIND 
    22 ; search the file in the all !path directories (use 
    23 ; find.pro) 
     21; search the file in the all !path directories (use <pro>find</pro>) 
    2422; 
    2523; @keyword HELP 
  • trunk/SRC/ToBeReviewed/STRING/getwrd.pro

    r372 r374  
    4444; given is used.  This saves finding the words again. 
    4545; If m > n wrd will be a string of words from word n to 
    46 ; word m.  If no m is given wrd will be a single word. 
     46; word m. If no m is given wrd will be a single word. 
    4747; n<0 returns text starting at word abs(n) to string end 
    4848; If n is out of range then a null string is returned. 
    49 ; See also nwrds. 
     49; See also <pro>nwrds</pro>. 
    5050; 
    5151; @history 
  • trunk/SRC/ToBeReviewed/STRING/putfile.pro

    r372 r374  
    77; 
    88; @param FILE {in}{required}{type=string} 
    9 ; = text file name. 
     9; text file name. 
    1010; 
    1111; @param S {in}{required}{type=string or array} 
    12 ; = string array. 
     12; string array. 
    1313; 
    1414; @keyword ERROR 
    15 ; =err  error flag: 0=ok, 1=invalid string array. 
     15; error flag: 0=ok, 1=invalid string array. 
    1616;  
    1717; @history 
  • trunk/SRC/ToBeReviewed/STRING/string2struct.pro

    r372 r374  
    3939; 
    4040; @param STRVAL {IN}{REQUIRED} 
    41 ; String set up as keywords. Keywords require a little special treatment. Such as 
    42 ; plot,findgen(100),_extra=stringToStructure('title="testing"') 
     41; String set up as keywords. Keywords require a little special treatment.  
     42; Such as 
     43; 
     44; plot,findgen(100),_extra=string2struct('title="testing"') 
    4345; 
    4446; @returns 
     
    5052;       pro tPlot,event 
    5153;       widget_control,event.top,get_uvalue=field 
    52 ;       widget_control,field,get_value=strVal 
    53 ;       extra = stringToStructure(strVal) 
     54;       widget_control,field,get_value=strval 
     55;       extra = string2struct(strval) 
    5456;       plot,findgen(100),_extra=extra 
    5557;       wshow 
     
    7880; 
    7981;- 
    80 FUNCTION string2struct,strVal 
     82FUNCTION string2struct,strval 
    8183; 
    8284  compile_opt idl2, strictarrsubs 
    8385; 
    84 r = execute('extra = too_cool(' + strVal[0] +')') 
     86r = execute('extra = too_cool(' + strval[0] +')') 
    8587;if r = 0 then user did not enter keywords correctly so 
    8688;return a structure with a null field. 
     
    9193return,extra 
    9294end 
    93  
  • trunk/SRC/ToBeReviewed/STRING/strright.pro

    r325 r374  
    1212; @param LASTN {in}{required}{default=1} 
    1313; the number of characters to be returned. 
    14 ; If NLAST is the strlen(STRING), the complete string 
     14; 
     15; If LASTN is the strlen(STRING), the complete string 
    1516; is returned. 
    1617; 
     
    1920; 
    2021; @examples 
    21 ; if (strright(path) ne '/') then path = path + '/' 
     22;  
     23; add a "/" in to path if it "/" is not at the end : 
     24; 
     25;  IDL> path="/tmp" 
     26;  IDL> if (strright(path) ne '/') then path = path + '/' 
     27;  IDL> print,path 
     28;  /tmp/ 
    2229; 
    2330; @history 
  • trunk/SRC/ToBeReviewed/STRING/strsci.pro

    r372 r374  
    33; @file_comments 
    44; Given a number, returns a string of that B 
    5 ; number in scientific notation format ( e.g. A x 10  ) 
     5; number in scientific notation format ( e.g. A x 10^B ) 
    66; 
    77; @categories 
  • trunk/SRC/ToBeReviewed/STRING/strtok.pro

    r372 r374  
    3333; were set, old would be 'bar' on return. 
    3434; 
     35; not ok ++ 
     36;   IDL> old='foo44 bar' 
     37;   IDL> res=strtok( old, '44' ) 
     38;   IDL> print,res 
     39;       0           5 
     40;   IDL> print,old 
     41;      foo44 bar 
     42; 
     43;   IDL> old='foo44 bar' 
     44;   IDL> res=strtok( old, '44',/TRIM ) 
     45;   IDL> print,res 
     46;       0           5 
     47;   IDL> print,old 
     48;      foo44 bar 
     49; 
     50; not ok ++ 
    3551; If old='xyz', then new=strtok(old,'a') would return with 
    3652; new='xyz' and old=''. 
     53;   IDL> old='xyz' 
     54;   IDL> new=strtok( old, 'a' ) 
     55;   IDL> print,new 
     56;           0 
     57;   IDL> print,old 
     58;   xyz 
     59 
    3760; 
    3861; @history 
     
    116139 
    117140END 
    118  
Note: See TracChangeset for help on using the changeset viewer.