source: trunk/SRC/Documentation/idldoc_html_output/Matrix/make_selection.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 7.3 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>make_selection.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="make_selection.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../overview.html" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../Matrix//make_selection.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="inter.html">&lt;&lt;prev file</a> | <a href="union.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="make_selection.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html">Matrix/</a></h1>
82      <h2 class="pro_file">make_selection.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 Convert an array of selected values to an index
91 array that identifies the selected values in a list or data array.
92</div>
93
94     
95
96     
97
98     
99
100     
101
102      <div id="routine_details">
103       
104
105        <div class="routine_details" id="_make_selection">
106
107          <h2><a class="top" href="#container">top</a>make_selection <span class="categories">
108 tools
109</span></h2>
110       
111          <p class="header">
112            <span class="result">result = </span>make_selection(<span class="result"><a href="#_make_selection_param_names">names</a>, <a href="#_make_selection_param_selnames">selnames</a></span>, <a href="#_make_selection_keyword_ONLY_VALID">ONLY_VALID</a>=<span class="result">ONLY_VALID</span>, <a href="#_make_selection_keyword_REQUIRED">REQUIRED</a>=<span class="result">REQUIRED</span>, <a href="#_make_selection_keyword_QUIET">QUIET</a>=<span class="result">QUIET</span>)</p>
113       
114          <div class="comments">
115</div>
116
117          <h3>Return value</h3><div class="preformat">
118 A (long) array with indexes to reference the selected values
119 in the NAMES array.
120</div>
121
122         
123            <h3>Parameters</h3>
124       
125           
126            <h4 id="_make_selection_param_names">names&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
127              <span class="attr">in</span>
128             
129             
130              <span class="attr">required</span>
131             
132             
133             
134             
135            </h4>
136       
137          <div class="comments">
138 A list or array of values to choose from
139</div>
140           
141            <h4 id="_make_selection_param_selnames">selnames&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
142              <span class="attr">in</span>
143             
144             
145              <span class="attr">required</span>
146             
147             
148             
149             
150            </h4>
151       
152          <div class="comments">
153 A list of selected values
154</div>
155           
156
157         
158
159         
160
161            <h3>Keywords</h3>
162           
163            <h4 id="_make_selection_keyword_ONLY_VALID">ONLY_VALID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
164             
165             
166             
167             
168             
169             
170             
171             
172            </h4>
173       
174            <div class="comments">
175 Return only indexes of found values. Values not
176 found are skipped. Default is to return 1 index value for
177 each SELNAME, which is -1 if SELNAME is not contained in
178 NAMES. If ONLY_VALID is set, the -1 values will be deleted,
179 and a value of -1 indicates that no SELNAME has been found
180 at all.
181</div>
182           
183            <h4 id="_make_selection_keyword_REQUIRED">REQUIRED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
184             
185             
186             
187             
188             
189             
190             
191             
192            </h4>
193       
194            <div class="comments">
195 Normally, MAKE_SELECTION will return indexes for
196 all values that are found, simply ignoring the selected
197 values that are not in the NAMES array (although an error
198 message is displayed). Set this keyword to return with
199 -1 as soon as a selected value is not found.
200</div>
201           
202            <h4 id="_make_selection_keyword_QUIET">QUIET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
203             
204             
205             
206             
207             
208             
209             
210             
211            </h4>
212       
213            <div class="comments">
214 Suppress printing of the error message if a
215 selected value is not found (the error condition will
216 still be set).
217</div>
218           
219         
220
221          <h3>Examples</h3><div class="preformat">
222           names = [ 'Alfred','Anton','Peter','John','Mary']
223           index = MAKE_SELECTION(names,['Peter','Mary'])
224           print,index
225           ; prints  2  4
226
227           vals = indgen(20)
228           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9])
229           print,index
230           ; prints  9  -1  8  7  7  8  9
231
232           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/ONLY_VALID)
233           print,index
234           ; prints  9  8  7  7  8  9
235
236           index = MAKE_SELECTION(vals,[9,-5,8,7,7,8,9],/REQUIRED)
237           print,index
238           ; prints  -1
239</div>
240          <h3>Version history</h3>
241         
242          <h4>Version</h4><div class="preformat">
243 $Id: make_selection.pro 325 2007-12-06 10:04:53Z pinsard $
244</div>
245          <h4>History</h4><div class="preformat">
246 mgs, 28 Aug 1998: VERSION 1.00
247 mgs, 29 Aug 1998: - changed behavior and added ONLY_VALID keyword
248 Copyright (C) 1998, Martin Schultz, Harvard University
249 This software is provided as is without any warranty
250 whatsoever. It may be freely used, copied or distributed
251 for non-commercial purposes. This copyright notice must be
252 kept with any copy of this software. If this software shall
253 be used commercially or sold as part of a larger package,
254 please contact the author to arrange payment.
255 Bugs and comments should be directed to mgs@io.harvard.edu
256 with subject "IDL routine make_selection"
257</div>
258         
259         
260          <h3>Known issues</h3>
261         
262         
263         
264          <h4>Restrictions</h4><div class="preformat">
265 If the NAMES array contains multiple entries of the same value,
266 only the index to the first entry will be returned.
267
268 A selection can contain multiple instances of the same value.
269 The index array will contain one entry per selected item
270 (See example below)
271</div>
272       
273         
274         
275         
276         
277         
278         
279         
280       
281          <h3>Statistics</h3>
282          <table class="statistics">
283            <tr><td>McCabe cyclic</td><td>           8</td></tr>
284            <tr><td>McCabe essential</td><td>           1</td></tr>
285            <tr><td>McCabe modular design</td><td>           1</td></tr>
286          </table>
287         
288       
289        </div>
290       
291      </div>
292
293     
294
295      <div id="tagline">Produced by IDLdoc 2.0.</div>
296
297    </div>
298
299  </body>
300</html>
Note: See TracBrowser for help on using the repository browser.