[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> |
---|
| 9 | <title>strsci.pro (IDLdoc API 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="strsci.pro (IDLdoc API documentation)"; |
---|
| 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
| 26 | <h1>IDLdoc API 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?format=raw" title="Overview of library">Overview</a></td> |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | <td><a href="./../../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td> |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | <td><a href="./../../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td> |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | <td><a href="./../../search-page.html?format=raw" title="Search library">Search</a></td> |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <td >Source</td> |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | <td><a href="./../../idldoc-help.html?format=raw" title="Help on IDLdoc">Help</a></td> |
---|
| 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 | |
---|
| 74 | <a href="strright.html"><<prev file</a> | <a href="strtok.html">next file >></a> <a href="strsci.html" target="_TOP">view single page</a> | <a href="./../../index.html?format=raw" target="_TOP">view frames</a> summary: fields | routine 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?format=raw">ToBeReviewed/STRING/</a></h1> |
---|
| 82 | <h2 class="pro_file">strsci.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
| 89 | <div id="file_comments"></div> |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | <div id="routine_details"> |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | <div class="routine_details" id="_StrSci"> |
---|
| 103 | |
---|
| 104 | <h2><a class="top" href="#container">top</a>StrSci </h2> |
---|
| 105 | |
---|
| 106 | <p class="header"> |
---|
| 107 | <span class="result">result = </span>StrSci(<span class="result"><a href="#_StrSci_param_Data">Data</a></span>, <a href="#_StrSci_keyword_Format">Format</a>=<span class="result">Format</span>, <a href="#_StrSci_keyword_POT_Only">POT_Only</a>=<span class="result">POT_Only</span>, <a href="#_StrSci_keyword_MANTISSA_ONLY">MANTISSA_ONLY</a>=<span class="result">MANTISSA_ONLY</span>, <a href="#_StrSci_keyword_SHORT">SHORT</a>=<span class="result">SHORT</span>, <a href="#_StrSci_keyword_TRIM">TRIM</a>=<span class="result">TRIM</span>)</p> |
---|
| 108 | |
---|
| 109 | <div class="comments"> |
---|
| 110 | NAME: |
---|
| 111 | STRSCI (function) |
---|
| 112 | |
---|
| 113 | PURPOSE: |
---|
| 114 | Given a number, returns a string of that B |
---|
| 115 | number in scientific notation format ( e.g. A x 10 ) |
---|
| 116 | |
---|
| 117 | CATEGORY: |
---|
| 118 | String Utilities |
---|
| 119 | |
---|
| 120 | CALLING SEQUENCE: |
---|
| 121 | Result = STRSCI( DATA [,keywords] ) |
---|
| 122 | |
---|
| 123 | INPUTS: |
---|
| 124 | DATA -> A floating point or integer number to be |
---|
| 125 | converted into a power of 10. |
---|
| 126 | |
---|
| 127 | KEYWORD PARAMETERS: |
---|
| 128 | FORMAT -> The format specification used in the string |
---|
| 129 | conversion for the mantissa (i.e. the |
---|
| 130 | "A" of "A x 10^B"). Default is '(f12.2)'. |
---|
| 131 | |
---|
| 132 | /POT_ONLY -> Will return only the "power of 10" part of the |
---|
| 133 | string (i.e. the "10^B"). Default is to return |
---|
| 134 | the entire string (e.g. "A x 10^B" ) |
---|
| 135 | |
---|
| 136 | /MANTISSA_ONLY -> return only mantissa of the string |
---|
| 137 | |
---|
| 138 | /SHORT -> return 10^0 as '1' and 10^1 as '10' |
---|
| 139 | |
---|
| 140 | /TRIM -> don't insert blanks (i.e. return Ax10^B) |
---|
| 141 | |
---|
| 142 | OUTPUTS: |
---|
| 143 | None |
---|
| 144 | |
---|
| 145 | SUBROUTINES: |
---|
| 146 | None |
---|
| 147 | |
---|
| 148 | REQUIREMENTS: |
---|
| 149 | None |
---|
| 150 | |
---|
| 151 | NOTES: |
---|
| 152 | This function does not "evaluate" the format statement thoroughly |
---|
| 153 | which can result in somewhat quirky strings. Example: |
---|
| 154 | print,strsci(-9.999) results in -10.0x10^0 instead of -1.0x10^1. |
---|
| 155 | |
---|
| 156 | Need a better symbol than the 'x' for the multiplier... |
---|
| 157 | |
---|
| 158 | EXAMPLE: |
---|
| 159 | Result = STRSCI( 2000000, format='(i1)' ) |
---|
| 160 | print, result |
---|
| 161 | ; 6 |
---|
| 162 | ; prints 2 x 10!u6!n, which gets plotted as 2 x 10 |
---|
| 163 | |
---|
| 164 | Result = STRSCI( -0.0001 ) |
---|
| 165 | print, result |
---|
| 166 | ; 4 |
---|
| 167 | ; prints -1.00 x 10!u-4!n, which gets plotted as 1.00 x 10 |
---|
| 168 | |
---|
| 169 | Result = STRSCI( 0d0, format='(f13.8)' ) |
---|
| 170 | print, result |
---|
| 171 | ; |
---|
| 172 | ; prints, 0.00000000 |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | MODIFICATION HISTORY: |
---|
| 176 | bmy, 28 May 1998: VERSION 1.00 B |
---|
| 177 | - now returns string of the form A x 10 |
---|
| 178 | mgs, 29 May 1998: |
---|
| 179 | - bug fix: now allows negative numbers |
---|
| 180 | - keyword MANTISSA_ONLY added |
---|
| 181 | - default format changed to f12.2 |
---|
| 182 | bmy, 02 Jun 1998: |
---|
| 183 | - renamed to STRSCI ("STRing SCIentific notation"), |
---|
| 184 | mgs, 03 Jun 1998: |
---|
| 185 | - added TRIM keyword |
---|
| 186 | mgs, 22 Sep 1998: |
---|
| 187 | - added SHORT keyword |
---|
| 188 | - modified handling of TRIM keyword |
---|
| 189 | mgs, 24 Sep 1998: |
---|
| 190 | - bug fix with SHORT flag |
---|
| 191 | bmy & mgs, 02 Jun 1999: |
---|
| 192 | - now can handle DATA=0.0 correctly |
---|
| 193 | - updated comments |
---|
| 194 | mgs, 03 Jun 1999: |
---|
| 195 | - can now also handle values lt 1 ;-) |
---|
| 196 | - and doesn't choke on arrays |
---|
| 197 | </div> |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | <h3>Parameters</h3> |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | <h4 id="_StrSci_param_Data">Data |
---|
| 206 | |
---|
| 207 | |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | </h4> |
---|
| 215 | |
---|
| 216 | <div class="comments"></div> |
---|
| 217 | |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | <h3>Keywords</h3> |
---|
| 224 | |
---|
| 225 | <h4 id="_StrSci_keyword_Format">Format |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | </h4> |
---|
| 235 | |
---|
| 236 | <div class="comments"></div> |
---|
| 237 | |
---|
| 238 | <h4 id="_StrSci_keyword_POT_Only">POT_Only |
---|
| 239 | |
---|
| 240 | |
---|
| 241 | |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | </h4> |
---|
| 248 | |
---|
| 249 | <div class="comments"></div> |
---|
| 250 | |
---|
| 251 | <h4 id="_StrSci_keyword_MANTISSA_ONLY">MANTISSA_ONLY |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | </h4> |
---|
| 261 | |
---|
| 262 | <div class="comments"></div> |
---|
| 263 | |
---|
| 264 | <h4 id="_StrSci_keyword_SHORT">SHORT |
---|
| 265 | |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | </h4> |
---|
| 274 | |
---|
| 275 | <div class="comments"></div> |
---|
| 276 | |
---|
| 277 | <h4 id="_StrSci_keyword_TRIM">TRIM |
---|
| 278 | |
---|
| 279 | |
---|
| 280 | |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | </h4> |
---|
| 287 | |
---|
| 288 | <div class="comments"></div> |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | |
---|
| 299 | |
---|
| 300 | |
---|
| 301 | |
---|
| 302 | |
---|
| 303 | |
---|
| 304 | |
---|
| 305 | |
---|
| 306 | |
---|
| 307 | |
---|
| 308 | |
---|
| 309 | |
---|
| 310 | |
---|
| 311 | |
---|
| 312 | |
---|
| 313 | |
---|
| 314 | |
---|
| 315 | </div> |
---|
| 316 | |
---|
| 317 | </div> |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 322 | |
---|
| 323 | </div> |
---|
| 324 | |
---|
| 325 | </body> |
---|
| 326 | </html> |
---|