[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>string2struct.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="string2struct.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/STRING//string2struct.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 | <a href="str_size.html"><<prev file</a> | <a href="strkeywd.html">next file >></a> <a href="string2struct.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a> summary: fields | <a href="#routine_summary">routine</a> 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/STRING/</a></h1> |
---|
[89] | 82 | <h2 class="pro_file">string2struct.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
[142] | 89 | <div id="file_comments"> |
---|
[234] | 90 | This is a really, really cool way to turn keywords into a structure. |
---|
[157] | 91 | |
---|
[234] | 92 | |
---|
[142] | 93 | Takes an input string set up as keywords and returns an anonymous structure. |
---|
| 94 | This is particularly useful for taking keywords entered by a user in a text |
---|
| 95 | field and passing then to other routines. |
---|
| 96 | </div> |
---|
[89] | 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | <div id="routine_summary"> |
---|
| 106 | <h2>Routine summary</h2> |
---|
| 107 | |
---|
| 108 | <dl> |
---|
| 109 | |
---|
[234] | 110 | <dt><p><a href="#_too_cool"><span class="result">result = </span>too_cool(_EXTRA=<span class="result">_EXTRA</span>)</a></p><dt> |
---|
| 111 | <dd> </dd> |
---|
[89] | 112 | |
---|
| 113 | <dt><p><a href="#_string2struct"><span class="result">result = </span>string2struct(<span class="result">strVal</span>)</a></p><dt> |
---|
[142] | 114 | <dd> </dd> |
---|
[89] | 115 | |
---|
| 116 | </dl> |
---|
| 117 | </div> |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | <div id="routine_details"> |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | <div class="routine_details" id="_too_cool"> |
---|
| 124 | |
---|
[157] | 125 | <h2><a class="top" href="#container">top</a>too_cool <span class="categories"> |
---|
| 126 | |
---|
| 127 | </span></h2> |
---|
[89] | 128 | |
---|
| 129 | <p class="header"> |
---|
[234] | 130 | <span class="result">result = </span>too_cool(<a href="#_too_cool_keyword__EXTRA">_EXTRA</a>=<span class="result">_EXTRA</span>)</p> |
---|
[89] | 131 | |
---|
[234] | 132 | <div class="comments"> |
---|
| 133 | </div> |
---|
[89] | 134 | |
---|
[157] | 135 | <h3>Return value</h3><div class="preformat"> |
---|
| 136 | </div> |
---|
| 137 | |
---|
[89] | 138 | |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | <h3>Keywords</h3> |
---|
| 143 | |
---|
[234] | 144 | <h4 id="_too_cool_keyword__EXTRA">_EXTRA |
---|
[89] | 145 | |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | </h4> |
---|
| 154 | |
---|
[157] | 155 | <div class="comments"> |
---|
[234] | 156 | Used to pass keywords |
---|
[157] | 157 | </div> |
---|
[89] | 158 | |
---|
| 159 | |
---|
| 160 | |
---|
[157] | 161 | <h3>Examples</h3><div class="preformat"> |
---|
| 162 | </div> |
---|
| 163 | <h3>Version history</h3> |
---|
[89] | 164 | |
---|
[157] | 165 | <h4>Version</h4><div class="preformat"> |
---|
[290] | 166 | $Id: string2struct.pro 262 2007-08-21 14:19:32Z pinsard $</div> |
---|
[157] | 167 | <h4>History</h4><div class="preformat"> |
---|
| 168 | </div> |
---|
[89] | 169 | |
---|
| 170 | |
---|
[157] | 171 | <h3>Known issues</h3> |
---|
[89] | 172 | |
---|
| 173 | |
---|
| 174 | |
---|
[157] | 175 | <h4>Restrictions</h4><div class="preformat"> |
---|
| 176 | </div> |
---|
[89] | 177 | |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
[163] | 186 | <h3>Statistics</h3> |
---|
| 187 | <table class="statistics"> |
---|
| 188 | <tr><td>McCabe cyclic</td><td> 1</td></tr> |
---|
| 189 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 190 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 191 | </table> |
---|
[89] | 192 | |
---|
| 193 | |
---|
| 194 | </div> |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | <div class="routine_details" id="_string2struct"> |
---|
| 198 | |
---|
[142] | 199 | <h2><a class="top" href="#container">top</a>string2struct <span class="categories"> |
---|
[157] | 200 | Utilities |
---|
[142] | 201 | </span></h2> |
---|
[89] | 202 | |
---|
| 203 | <p class="header"> |
---|
| 204 | <span class="result">result = </span>string2struct(<span class="result"><a href="#_string2struct_param_strVal">strVal</a></span>)</p> |
---|
| 205 | |
---|
[97] | 206 | <div class="comments"> |
---|
[142] | 207 | </div> |
---|
[89] | 208 | |
---|
[234] | 209 | <h3>Return value</h3><div class="preformat"> |
---|
[142] | 210 | This function returns the string as an anonymous structure. If an |
---|
| 211 | error was found then this function returns a structure with a null field. |
---|
| 212 | </div> |
---|
[97] | 213 | |
---|
[142] | 214 | |
---|
| 215 | <h3>Parameters</h3> |
---|
| 216 | |
---|
| 217 | |
---|
| 218 | <h4 id="_string2struct_param_strVal">strVal |
---|
| 219 | <span class="attr">in</span> |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | <span class="attr">required</span> |
---|
| 223 | |
---|
| 224 | |
---|
| 225 | |
---|
| 226 | |
---|
| 227 | </h4> |
---|
| 228 | |
---|
| 229 | <div class="comments"> |
---|
| 230 | String set up as keywords. Keywords require a little special treatment. Such as |
---|
| 231 | plot,findgen(100),_extra=stringToStructure('title="testing"') |
---|
| 232 | </div> |
---|
| 233 | |
---|
[97] | 234 | |
---|
[142] | 235 | |
---|
[97] | 236 | |
---|
[142] | 237 | |
---|
[97] | 238 | |
---|
[142] | 239 | <h3>Examples</h3><div class="preformat"> |
---|
[97] | 240 | The code below creates a widget that uses this routine. |
---|
| 241 | pro tPlot,event |
---|
| 242 | widget_control,event.top,get_uvalue=field |
---|
| 243 | widget_control,field,get_value=strVal |
---|
| 244 | extra = stringToStructure(strVal) |
---|
| 245 | plot,findgen(100),_extra=extra |
---|
| 246 | wshow |
---|
| 247 | return |
---|
| 248 | end |
---|
| 249 | |
---|
| 250 | pro testWid |
---|
| 251 | ;enter any keyword to plot and see how it works |
---|
| 252 | base = widget_base(/col) |
---|
| 253 | field = cw_field(base,title='test',value='ax=0',/string) |
---|
| 254 | void = widget_button(base,value='plot',event_pro='tPlot') |
---|
| 255 | widget_control,base,/realize,set_uvalue=field |
---|
| 256 | xmanager,'testWid',base,/no_block |
---|
| 257 | return |
---|
| 258 | end |
---|
[142] | 259 | </div> |
---|
| 260 | <h3>Version history</h3> |
---|
| 261 | |
---|
| 262 | <h4>Version</h4><div class="preformat"> |
---|
[290] | 263 | $Id: string2struct.pro 262 2007-08-21 14:19:32Z pinsard $ |
---|
[142] | 264 | </div> |
---|
| 265 | <h4>History</h4><div class="preformat"> |
---|
[97] | 266 | Written by: |
---|
[157] | 267 | RLK, Ronn Kling Consulting. |
---|
| 268 | ronn@rlkling.com |
---|
| 269 | www.rlkling.com |
---|
| 270 | May, 1999 |
---|
| 271 | </div> |
---|
[89] | 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | |
---|
| 277 | |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | |
---|
| 287 | |
---|
[163] | 288 | <h3>Statistics</h3> |
---|
| 289 | <table class="statistics"> |
---|
| 290 | <tr><td>McCabe cyclic</td><td> 2</td></tr> |
---|
| 291 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 292 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 293 | </table> |
---|
[89] | 294 | |
---|
| 295 | |
---|
| 296 | </div> |
---|
| 297 | |
---|
| 298 | </div> |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 303 | |
---|
| 304 | </div> |
---|
| 305 | |
---|
| 306 | </body> |
---|
[249] | 307 | </html> |
---|