Index: trunk/SRC/Matrix/make_selection.pro
===================================================================
--- trunk/SRC/Matrix/make_selection.pro	(revision 163)
+++ trunk/SRC/Matrix/make_selection.pro	(revision 223)
@@ -1,43 +1,51 @@
 ;+
 ;
-; file_comments 
+; @file_comments
 ; Convert an array of selected values to an index
-;        array that identifies the selected values in a list
-;        or data array. 
+; array that identifies the selected values in a list or data array.
 ;
-; categories tools
-; 
-; @param NAMES {in}{required} A list or array of values to choose from 
+; @categories
+; tools
 ;
-; @param SELNAMES {in}{required} A list of selected values
+; @param NAMES {in}{required}
+; A list or array of values to choose from
 ;
-; @keyword ONLY_VALID Return only indexes of found values. Values not
-;            found are skipped. Default is to return 1 index value for
-;            each SELNAME, which is -1 if SELNAME is not contained in 
-;            NAMES. If ONLY_VALID is set, the -1 values will be deleted,
-;            and a value of -1 indicates that no SELNAME has been found
-;            at all.
+; @param SELNAMES {in}{required}
+; A list of selected values
 ;
-; @keyword REQUIRED Normally, MAKE_SELECTION will return indexes for
-;            all values that are found, simply ignoring the selected
-;            values that are not in the NAMES array (although an error
-;            message is displayed). Set this keyword to return with
-;            -1 as soon as a selected value is not found.
+; @keyword ONLY_VALID
+; Return only indexes of found values. Values not
+; found are skipped. Default is to return 1 index value for
+; each SELNAME, which is -1 if SELNAME is not contained in
+; NAMES. If ONLY_VALID is set, the -1 values will be deleted,
+; and a value of -1 indicates that no SELNAME has been found
+; at all.
 ;
-; @keyword QUIET Suppress printing of the error message if a
-;            selected value is not found (the error condition will
-;            still be set).
+; @keyword REQUIRED
+; Normally, MAKE_SELECTION will return indexes for
+; all values that are found, simply ignoring the selected
+; values that are not in the NAMES array (although an error
+; message is displayed). Set this keyword to return with
+; -1 as soon as a selected value is not found.
 ;
-; @returns A (long) array with indexes to reference the selected values
-;        in the NAMES array.
+; @keyword QUIET
+; Suppress printing of the error message if a
+; selected value is not found (the error condition will
+; still be set).
 ;
-; @restrictions If the NAMES array contains multiple entries of the same value,
-;        only the index to the first entry will be returned.
+; @returns
+; A (long) array with indexes to reference the selected values
+; in the NAMES array.
 ;
-;        A selection can contain multiple instances of the same value.
-;        The index array will contain one entry per selected item
-;        (See example below)
+; @restrictions
+; If the NAMES array contains multiple entries of the same value,
+; only the index to the first entry will be returned.
 ;
-; @examples names = [ 'Alfred','Anton','Peter','John','Mary']
+; A selection can contain multiple instances of the same value.
+; The index array will contain one entry per selected item
+; (See example below)
+;
+; @examples
+;           names = [ 'Alfred','Anton','Peter','John','Mary']
 ;           index = MAKE_SELECTION(names,['Peter','Mary'])
 ;           print,index
@@ -57,8 +65,10 @@
 ;           ; prints  -1
 ;
-; @history mgs, 28 Aug 1998: VERSION 1.00
-;          mgs, 29 Aug 1998: - changed behavior and added ONLY_VALID keyword
+; @history
+; mgs, 28 Aug 1998: VERSION 1.00
+; mgs, 29 Aug 1998: - changed behavior and added ONLY_VALID keyword
 ;
-; @version $Id$
+; @version
+; $Id$
 ;
 ;-
@@ -81,22 +91,19 @@
   compile_opt idl2, strictarrsubs
 ;
- 
- 
- 
-    ; return an index array with a number for each element in 
+    ; return an index array with a number for each element in
     ; selnames that is found in names.
     ; Set the REQUIRED keyword to return -1 if one element is
-    ; not found, otherwise -1 will only be returned, if no 
+    ; not found, otherwise -1 will only be returned, if no
     ; element is found.
- 
+
     ; reset error state to 0
     message,/reset
- 
+
     quiet = keyword_set(quiet)
     result = -1L
- 
+
     for i=0,n_elements(selnames)-1 do begin
        test = where(names eq selnames[i])
-       result = [ result, test[0] ] 
+       result = [ result, test[0] ]
        if (test[0] lt 0) then begin
            if (keyword_set(ONLY_VALID) OR keyword_set(REQUIRED)) then $
@@ -106,5 +113,5 @@
        endif
     endfor
- 
+
     if (n_elements(result) gt 1) then result = result[1:*]
 
@@ -114,6 +121,6 @@
         else result = -1L
     endif
- 
+
     return,result
- 
+
 end
