[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"> |
---|
[402] | 117 | 1 if successful, otherwise 0. |
---|
[151] | 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 |
---|
[402] | 153 | be contained in STRUCTURE. |
---|
| 154 | |
---|
| 155 | CHKSTRU returns 1 (true) only if all field names are contained in STRUCTURE. |
---|
| 156 | |
---|
[151] | 157 | The entries of FIELDS may be upper or lowercase. |
---|
| 158 | </div> |
---|
[89] | 159 | |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | <h3>Keywords</h3> |
---|
| 166 | |
---|
[290] | 167 | <h4 id="_chkstru_keyword_INDEX">INDEX |
---|
[89] | 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
[163] | 173 | <span class="attr">type:</span> <span class="value">string</span> |
---|
[89] | 174 | |
---|
| 175 | |
---|
| 176 | </h4> |
---|
| 177 | |
---|
[151] | 178 | <div class="comments"> |
---|
| 179 | A named variable that will contain the indices of |
---|
[402] | 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. |
---|
[151] | 185 | </div> |
---|
[89] | 186 | |
---|
[290] | 187 | <h4 id="_chkstru_keyword_VERBOSE">VERBOSE |
---|
[89] | 188 | |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | </h4> |
---|
| 197 | |
---|
[151] | 198 | <div class="comments"> |
---|
[402] | 199 | set this keyword to return an error message in case of an error. |
---|
[151] | 200 | </div> |
---|
[89] | 201 | |
---|
[290] | 202 | <h4 id="_chkstru_keyword_EXTRACT">EXTRACT |
---|
[89] | 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | </h4> |
---|
| 212 | |
---|
[151] | 213 | <div class="comments"> |
---|
[402] | 214 | set this keyword to extract a field from the structure. |
---|
| 215 | -1 is return if field or structure are incorrect. |
---|
[151] | 216 | </div> |
---|
[89] | 217 | |
---|
| 218 | |
---|
| 219 | |
---|
[151] | 220 | <h3>Examples</h3><div class="preformat"> |
---|
[402] | 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') |
---|
[151] | 226 | 1 |
---|
[402] | 227 | IDL> print, CHKSTRU(test,'b',/extract) |
---|
[151] | 228 | 2 |
---|
| 229 | </div> |
---|
| 230 | <h3>Version history</h3> |
---|
[89] | 231 | |
---|
[151] | 232 | <h4>Version</h4><div class="preformat"> |
---|
[402] | 233 | $Id: chkstru.pro 375 2008-08-08 15:55:40Z pinsard $ |
---|
[290] | 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 |
---|
[338] | 243 | with subject "IDL routine chkstru" |
---|
| 244 | </div> |
---|
[151] | 245 | <h4>History</h4><div class="preformat"> |
---|
[402] | 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) |
---|
[157] | 249 | </div> |
---|
[89] | 250 | |
---|
| 251 | |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | |
---|
[163] | 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> |
---|
[89] | 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> |
---|
[249] | 285 | </html> |
---|