[89] | 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> |
---|
[104] | 9 | <title>chkstru.pro (SAXO Documentation)</title> |
---|
[89] | 10 | |
---|
| 11 | |
---|
[191] | 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" /> |
---|
[89] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
[104] | 18 | parent.document.title="chkstru.pro (SAXO Documentation)"; |
---|
[89] | 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
[104] | 26 | <h1>SAXO Documentation</h1> |
---|
[89] | 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../../overview.html" title="Overview of library">Overview</a></td> |
---|
[89] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[89] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[89] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../../search-page.html" title="Search library">Search</a></td> |
---|
[89] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../../ToBeReviewed/STRUCTURE//chkstru.pro" title="Source code of a file">Source</a></td> |
---|
[89] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[89] | 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
[189] | 74 | << prev file | <a href="extractstru.html">next file >></a> <a href="chkstru.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a> summary: fields | routine details: <a href="#routine_details">routine</a> |
---|
[89] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">ToBeReviewed/STRUCTURE/</a></h1> |
---|
[89] | 82 | <h2 class="pro_file">chkstru.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
[151] | 89 | <div id="file_comments"> |
---|
| 90 | check validity of a structure and test if necessary |
---|
| 91 | fields are contained |
---|
| 92 | </div> |
---|
[89] | 93 | |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | <div id="routine_details"> |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | <div class="routine_details" id="_chkstru"> |
---|
| 106 | |
---|
[151] | 107 | <h2><a class="top" href="#container">top</a>chkstru <span class="categories"> |
---|
[157] | 108 | Utilities |
---|
[151] | 109 | </span></h2> |
---|
[89] | 110 | |
---|
| 111 | <p class="header"> |
---|
[290] | 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> |
---|
[89] | 113 | |
---|
[151] | 114 | <div class="comments"></div> |
---|
[89] | 115 | |
---|
[151] | 116 | <h3>Return value</h3><div class="preformat"> |
---|
| 117 | CHKSTRU returns 1 if successful, otherwise 0. |
---|
| 118 | </div> |
---|
[89] | 119 | |
---|
| 120 | |
---|
| 121 | <h3>Parameters</h3> |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | <h4 id="_chkstru_param_structure">structure |
---|
[151] | 125 | <span class="attr">in</span> |
---|
[89] | 126 | |
---|
| 127 | |
---|
[151] | 128 | <span class="attr">required</span> |
---|
[89] | 129 | |
---|
[163] | 130 | <span class="attr">type:</span> <span class="value">struct</span> |
---|
[89] | 131 | |
---|
| 132 | |
---|
| 133 | </h4> |
---|
| 134 | |
---|
[151] | 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> |
---|
[89] | 139 | |
---|
| 140 | <h4 id="_chkstru_param_fields">fields |
---|
[151] | 141 | <span class="attr">in</span> |
---|
[89] | 142 | |
---|
| 143 | |
---|
[151] | 144 | <span class="attr">required</span> |
---|
[89] | 145 | |
---|
[163] | 146 | <span class="attr">type:</span> <span class="value">string</span> |
---|
[89] | 147 | |
---|
| 148 | |
---|
| 149 | </h4> |
---|
| 150 | |
---|
[151] | 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> |
---|
[89] | 157 | |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | <h3>Keywords</h3> |
---|
| 164 | |
---|
[290] | 165 | <h4 id="_chkstru_keyword_INDEX">INDEX |
---|
[89] | 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
[163] | 171 | <span class="attr">type:</span> <span class="value">string</span> |
---|
[89] | 172 | |
---|
| 173 | |
---|
| 174 | </h4> |
---|
| 175 | |
---|
[151] | 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> |
---|
[89] | 183 | |
---|
[290] | 184 | <h4 id="_chkstru_keyword_VERBOSE">VERBOSE |
---|
[89] | 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | </h4> |
---|
| 194 | |
---|
[151] | 195 | <div class="comments"> |
---|
| 196 | set this keyword to return an error message |
---|
| 197 | in case of an error. |
---|
| 198 | </div> |
---|
[89] | 199 | |
---|
[290] | 200 | <h4 id="_chkstru_keyword_EXTRACT">EXTRACT |
---|
[89] | 201 | |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | |
---|
| 208 | |
---|
| 209 | </h4> |
---|
| 210 | |
---|
[151] | 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> |
---|
[89] | 216 | |
---|
| 217 | |
---|
| 218 | |
---|
[151] | 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> |
---|
[89] | 229 | |
---|
[151] | 230 | <h4>Version</h4><div class="preformat"> |
---|
[290] | 231 | $Id: chkstru.pro 262 2007-08-21 14:19:32Z 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"</div> |
---|
[151] | 242 | <h4>History</h4><div class="preformat"> |
---|
| 243 | mgs, 02 Mar 1998: VERSION 1.00 |
---|
[157] | 244 | mgs, 07 Apr 1998: - second parameter (FIELDS) now optional |
---|
| 245 | 12 Jan 2001: EXTRACT keyword by S. Masson (smasson@lodyc.jussieu.fr) |
---|
| 246 | </div> |
---|
[89] | 247 | |
---|
| 248 | |
---|
| 249 | |
---|
| 250 | |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
[163] | 263 | <h3>Statistics</h3> |
---|
| 264 | <table class="statistics"> |
---|
| 265 | <tr><td>McCabe cyclic</td><td> 13</td></tr> |
---|
| 266 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 267 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 268 | </table> |
---|
[89] | 269 | |
---|
| 270 | |
---|
| 271 | </div> |
---|
| 272 | |
---|
| 273 | </div> |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 278 | |
---|
| 279 | </div> |
---|
| 280 | |
---|
| 281 | </body> |
---|
[249] | 282 | </html> |
---|