source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/STRUCTURE/chkstru.html @ 338

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

update documentation

File size: 6.7 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>chkstru.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="chkstru.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="../../../../ToBeReviewed/STRUCTURE//chkstru.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&lt;&lt; prev file | <a href="extractstru.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="chkstru.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">ToBeReviewed/STRUCTURE/</a></h1>
82      <h2 class="pro_file">chkstru.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 check validity of a structure and test if necessary
91 fields are contained
92</div>
93
94     
95
96     
97
98     
99
100     
101
102      <div id="routine_details">
103       
104
105        <div class="routine_details" id="_chkstru">
106
107          <h2><a class="top" href="#container">top</a>chkstru <span class="categories">
108 Utilities
109</span></h2>
110       
111          <p class="header">
112            <span class="result">result = </span>chkstru(<span class="result"><a href="#_chkstru_param_structure">structure</a>, <a href="#_chkstru_param_fields">fields</a></span>, <a href="#_chkstru_keyword_INDEX">INDEX</a>=<span class="result">string</span>, <a href="#_chkstru_keyword_VERBOSE">VERBOSE</a>=<span class="result">VERBOSE</span>, <a href="#_chkstru_keyword_EXTRACT">EXTRACT</a>=<span class="result">EXTRACT</span>)</p>
113       
114          <div class="comments"></div>
115
116          <h3>Return value</h3><div class="preformat">
117 CHKSTRU returns 1 if successful, otherwise 0.
118</div>
119
120         
121            <h3>Parameters</h3>
122       
123           
124            <h4 id="_chkstru_param_structure">structure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
125              <span class="attr">in</span>
126             
127             
128              <span class="attr">required</span>
129             
130              <span class="attr">type:</span> <span class="value">struct</span>
131             
132             
133            </h4>
134       
135          <div class="comments">
136 The structure to be tested. If STRUCTURE is
137 not of type structure, the function will return 0
138</div>
139           
140            <h4 id="_chkstru_param_fields">fields&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
141              <span class="attr">in</span>
142             
143             
144              <span class="attr">required</span>
145             
146              <span class="attr">type:</span> <span class="value">string</span>
147             
148             
149            </h4>
150       
151          <div class="comments">
152 A string or string array with field names to
153 be contained in STRUCTURE. CHKSTRU returns 1 (true)
154 only if all field names are contained in STRUCTURE.
155 The entries of FIELDS may be upper or lowercase.
156</div>
157           
158
159         
160
161         
162
163            <h3>Keywords</h3>
164           
165            <h4 id="_chkstru_keyword_INDEX">INDEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
166             
167             
168             
169             
170             
171              <span class="attr">type:</span> <span class="value">string</span>
172             
173             
174            </h4>
175       
176            <div class="comments">
177 A named variable that will contain the indices of
178 the required field names in the structure. They can then
179 be assessed through structure.(index[i]) . Index will
180 contain -1 for all fields entries that are not in the
181 structure.
182</div>
183           
184            <h4 id="_chkstru_keyword_VERBOSE">VERBOSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
185             
186             
187             
188             
189             
190             
191             
192             
193            </h4>
194       
195            <div class="comments">
196 set this keyword to return an error message
197 in case of an error.
198</div>
199           
200            <h4 id="_chkstru_keyword_EXTRACT">EXTRACT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
201             
202             
203             
204             
205             
206             
207             
208             
209            </h4>
210       
211            <div class="comments">
212 set this keyword to extract a fields from the
213 structure.  -1 is return is fields or structure. are
214 incorrect.
215</div>
216           
217         
218
219          <h3>Examples</h3><div class="preformat">
220        test = { a:1, b:2, c:3 }
221        required = ['a','c']
222        if CHKSTRU(test,required) then print,'found a and c.'
223        IDL> print, CHKSTRU(test,'b')
224           1
225        IDL> print, CHKSTRU(test,'b',/extract)
226               2
227</div>
228          <h3>Version history</h3>
229         
230          <h4>Version</h4><div class="preformat">
231 $Id: chkstru.pro 327 2007-12-13 16:22:35Z pinsard $
232
233 Copyright (C) 1998, Martin Schultz, Harvard University
234 This software is provided as is without any warranty
235 whatsoever. It may be freely used, copied or distributed
236 for non-commercial purposes. This copyright notice must be
237 kept with any copy of this software. If this software shall
238 be used commercially or sold as part of a larger package,
239 please contact the author to arrange payment.
240 Bugs and comments should be directed to mgs@io.harvard.edu
241 with subject "IDL routine chkstru"
242</div>
243          <h4>History</h4><div class="preformat">
244        mgs, 02 Mar 1998: VERSION 1.00
245        mgs, 07 Apr 1998: - second parameter (FIELDS) now optional
246        12 Jan 2001: EXTRACT keyword by S. Masson (smasson@lodyc.jussieu.fr)
247</div>
248         
249         
250         
251         
252         
253         
254         
255       
256         
257         
258         
259         
260         
261         
262         
263       
264          <h3>Statistics</h3>
265          <table class="statistics">
266            <tr><td>McCabe cyclic</td><td>          13</td></tr>
267            <tr><td>McCabe essential</td><td>           1</td></tr>
268            <tr><td>McCabe modular design</td><td>           1</td></tr>
269          </table>
270         
271       
272        </div>
273       
274      </div>
275
276     
277
278      <div id="tagline">Produced by IDLdoc 2.0.</div>
279
280    </div>
281
282  </body>
283</html>
Note: See TracBrowser for help on using the repository browser.