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

Last change on this file since 402 was 402, checked in by smasson, 15 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 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.
154
155 CHKSTRU returns 1 (true) only if all field names are contained in STRUCTURE.
156
157 The entries of FIELDS may be upper or lowercase.
158</div>
159           
160
161         
162
163         
164
165            <h3>Keywords</h3>
166           
167            <h4 id="_chkstru_keyword_INDEX">INDEX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
168             
169             
170             
171             
172             
173              <span class="attr">type:</span> <span class="value">string</span>
174             
175             
176            </h4>
177       
178            <div class="comments">
179 A named variable that will contain the indices of
180 the required field names in the structure.
181
182 They can then be assessed through structure.(index[i]).
183
184 Index will contain -1 for all fields entries that are not in the structure.
185</div>
186           
187            <h4 id="_chkstru_keyword_VERBOSE">VERBOSE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
188             
189             
190             
191             
192             
193             
194             
195             
196            </h4>
197       
198            <div class="comments">
199 set this keyword to return an error message in case of an error.
200</div>
201           
202            <h4 id="_chkstru_keyword_EXTRACT">EXTRACT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
203             
204             
205             
206             
207             
208             
209             
210             
211            </h4>
212       
213            <div class="comments">
214 set this keyword to extract a field from the structure. 
215 -1 is return if field or structure are incorrect.
216</div>
217           
218         
219
220          <h3>Examples</h3><div class="preformat">
221
222   IDL> test = { a:1, b:2, c:3 }
223   IDL> required = ['a','c']
224   IDL> if CHKSTRU(test,required) then print,'found a and c.'
225   IDL> print, CHKSTRU(test,'b')
226           1
227   IDL> print, CHKSTRU(test,'b',/extract)
228               2
229</div>
230          <h3>Version history</h3>
231         
232          <h4>Version</h4><div class="preformat">
233 $Id: chkstru.pro 375 2008-08-08 15:55:40Z pinsard $
234
235 Copyright (C) 1998, Martin Schultz, Harvard University
236 This software is provided as is without any warranty
237 whatsoever. It may be freely used, copied or distributed
238 for non-commercial purposes. This copyright notice must be
239 kept with any copy of this software. If this software shall
240 be used commercially or sold as part of a larger package,
241 please contact the author to arrange payment.
242 Bugs and comments should be directed to mgs@io.harvard.edu
243 with subject "IDL routine chkstru"
244</div>
245          <h4>History</h4><div class="preformat">
246  - mgs, 02 Mar 1998: VERSION 1.00
247  - mgs, 07 Apr 1998: - second parameter (FIELDS) now optional
248  - 12 Jan 2001: EXTRACT keyword by S. Masson (smasson@lodyc.jussieu.fr)
249</div>
250         
251         
252         
253         
254         
255         
256         
257       
258         
259         
260         
261         
262         
263         
264         
265       
266          <h3>Statistics</h3>
267          <table class="statistics">
268            <tr><td>McCabe cyclic</td><td>          13</td></tr>
269            <tr><td>McCabe essential</td><td>           1</td></tr>
270            <tr><td>McCabe modular design</td><td>           1</td></tr>
271          </table>
272         
273       
274        </div>
275       
276      </div>
277
278     
279
280      <div id="tagline">Produced by IDLdoc 2.0.</div>
281
282    </div>
283
284  </body>
285</html>
Note: See TracBrowser for help on using the repository browser.