source: trunk/SRC/Documentation/idldoc_assistant_output/Matrix/make_selection.html @ 249

Last change on this file since 249 was 249, checked in by smasson, 17 years ago

update documentation

File size: 6.0 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>make_selection.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="inter.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="union.html"><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Matrix/</font></h1>
58    <h2>make_selection.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 Convert an array of selected values to an index
65 array that identifies the selected values in a list or data array.
66
67
68   
69
70     
71      <a name="#_make_selection"></a>
72
73      <h2>make_selection  <font size="-1" color="#006633">
74 tools
75</font></h2>
76
77      <p><font face="Courier"><i>result = </i>make_selection(<i><a href="#_make_selection_keyword_names">names</a>, <a href="#_make_selection_keyword_selnames">selnames</a></i>, <a href="#_make_selection_keyword_only_valid">only_valid</a>=<i>only_valid</i>, <a href="#_make_selection_keyword_required">required</a>=<i>required</i>, <a href="#_make_selection_keyword_quiet">quiet</a>=<i>quiet</i>)</font></p>
78
79   
80
81
82    <h3>Return value</h3>
83 A (long) array with indexes to reference the selected values
84 in the NAMES array.
85
86
87   
88    <h3>Parameters</h3>
89   
90
91    <a name="#_make_selection_keyword_names"></a>
92    <h4>names&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
93      <font size="-1" color="#006633">in</font>
94     
95     
96      <font size="-1" color="#006633">required</font>
97     
98     
99     
100     
101    </h4>
102
103   
104 A list or array of values to choose from
105
106   
107
108    <a name="#_make_selection_keyword_selnames"></a>
109    <h4>selnames&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
110      <font size="-1" color="#006633">in</font>
111     
112     
113      <font size="-1" color="#006633">required</font>
114     
115     
116     
117     
118    </h4>
119
120   
121 A list of selected values
122
123   
124   
125
126   
127    <h3>Keywords</h3>
128
129   
130    <a name="#_make_selection_keyword_only_valid"></a>
131    <h4>only_valid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132     
133     
134     
135     
136     
137     
138     
139     
140    </h4>
141
142   
143 Return only indexes of found values. Values not
144 found are skipped. Default is to return 1 index value for
145 each SELNAME, which is -1 if SELNAME is not contained in
146 NAMES. If ONLY_VALID is set, the -1 values will be deleted,
147 and a value of -1 indicates that no SELNAME has been found
148 at all.
149
150   
151    <a name="#_make_selection_keyword_required"></a>
152    <h4>required&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
153     
154     
155     
156     
157     
158     
159     
160     
161    </h4>
162
163   
164 Normally, MAKE_SELECTION will return indexes for
165 all values that are found, simply ignoring the selected
166 values that are not in the NAMES array (although an error
167 message is displayed). Set this keyword to return with
168 -1 as soon as a selected value is not found.
169
170   
171    <a name="#_make_selection_keyword_quiet"></a>
172    <h4>quiet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
173     
174     
175     
176     
177     
178     
179     
180     
181    </h4>
182
183   
184 Suppress printing of the error message if a
185 selected value is not found (the error condition will
186 still be set).
187
188   
189   
190
191    <h3>Examples</h3><pre>
192           names = [ 'Alfred','Anton','Peter','John','Mary']
193           index = MAKE_SELECTION(names,['Peter','Mary'])
194           print,index
195           ; prints  2  4
196
197           vals = indgen(20)
198           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9])
199           print,index
200           ; prints  9  -1  8  7  7  8  9
201
202           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/ONLY_VALID)
203           print,index
204           ; prints  9  8  7  7  8  9
205
206           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/REQUIRED)
207           print,index
208           ; prints  -1
209
210    </pre><h3>Version history</h3>
211   
212    <h4>Version</h4>
213 $Id: make_selection.pro 232 2007-03-20 16:59:36Z pinsard $
214
215    <h4>History</h4>
216 mgs, 28 Aug 1998: VERSION 1.00
217 mgs, 29 Aug 1998: - changed behavior and added ONLY_VALID keyword
218 Copyright (C) 1998, Martin Schultz, Harvard University
219 This software is provided as is without any warranty
220 whatsoever. It may be freely used, copied or distributed
221 for non-commercial purposes. This copyright notice must be
222 kept with any copy of this software. If this software shall
223 be used commercially or sold as part of a larger package,
224 please contact the author to arrange payment.
225 Bugs and comments should be directed to mgs@io.harvard.edu
226 with subject "IDL routine make_selection"
227
228   
229
230    <h3>Known issues</h3>
231   
232   
233   
234    <h4>Restrictions</h4>
235 If the NAMES array contains multiple entries of the same value,
236 only the index to the first entry will be returned.
237
238 A selection can contain multiple instances of the same value.
239 The index array will contain one entry per selected item
240 (See example below)
241
242
243   
244   
245   
246   
247   
248   
249   
250
251    <font size="-3"><p>&nbsp;</p></font>
252    <hr size="1" color="#CCCCCC"/>
253     
254
255   
256
257    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
258
259  </body>
260</html>
Note: See TracBrowser for help on using the repository browser.