[163] | 1 | |
---|
| 2 | |
---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 4 | <head> |
---|
| 5 | <title>strsci.pro (SAXO Documentation Assistant)</title> |
---|
| 6 | </head> |
---|
| 7 | |
---|
| 8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
| 9 | |
---|
| 10 | |
---|
| 11 | <!-- Navbar template takes a structure with the following fields: |
---|
| 12 | overview_href : |
---|
| 13 | overview_selected : |
---|
| 14 | dir_overview_href : |
---|
| 15 | dir_overview_selected : |
---|
| 16 | categories_href : |
---|
| 17 | categories_selected : |
---|
| 18 | index_href : |
---|
| 19 | index_selected : |
---|
| 20 | search_href : |
---|
| 21 | search_selected : |
---|
| 22 | file_selected : |
---|
| 23 | source_href : |
---|
| 24 | source_selected : |
---|
| 25 | help_href : |
---|
| 26 | help_selected : |
---|
| 27 | etc_selected : |
---|
| 28 | |
---|
| 29 | prev_file_href : |
---|
| 30 | next_file_href : |
---|
| 31 | |
---|
| 32 | view_single_page_href : |
---|
| 33 | view_frames_href : |
---|
| 34 | |
---|
| 35 | summary_fields_href : |
---|
| 36 | summary_routine_href : |
---|
| 37 | details_routine_href : |
---|
| 38 | |
---|
| 39 | title : |
---|
| 40 | subtitle : |
---|
| 41 | user : |
---|
| 42 | --> |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
| 46 | <tr> |
---|
| 47 | <td width="10%"> |
---|
| 48 | <a href="strright.html"><img src="./../../prev.gif" border="0" alt="Previous"></a></td> |
---|
| 49 | <td width="80%" align="center" valign="center"> |
---|
| 50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../../home.html">Overview</a></font></td> |
---|
| 51 | <td width="10%" align="right"> |
---|
| 52 | <a href="strtok.html"><img src="./../../next.gif" border="0" alt="Next"></a></td> |
---|
| 53 | </tr> |
---|
| 54 | </table> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <h1><font size="-2">ToBeReviewed/STRING/</font></h1> |
---|
| 58 | <h2>strsci.pro</h2> |
---|
| 59 | |
---|
| 60 | <dl> |
---|
| 61 | </dl> |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | Given a number, returns a string of that B |
---|
| 65 | number in scientific notation format ( e.g. A x 10 ) |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | <a name="#_strsci"></a> |
---|
| 72 | |
---|
| 73 | <h2>strsci <font size="-1" color="#006633"> |
---|
| 74 | String |
---|
| 75 | </font></h2> |
---|
| 76 | |
---|
| 77 | <p><font face="Courier"><i>result = </i>strsci(<i><a href="#_strsci_keyword_Data">Data</a></i>, <a href="#_strsci_keyword_Format">Format</a>=<i>Format</i>, <a href="#_strsci_keyword_POT_Only">POT_Only</a>=<i>POT_Only</i>, <a href="#_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY</a>=<i>MANTISSA_ONLY</i>, <a href="#_strsci_keyword_SHORT">SHORT</a>=<i>SHORT</i>, <a href="#_strsci_keyword_TRIM">TRIM</a>=<i>TRIM</i>)</font></p> |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | <h3>Parameters</h3> |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | <a name="#_strsci_keyword_Data"></a> |
---|
| 89 | <h4>Data |
---|
| 90 | <font size="-1" color="#006633">in</font> |
---|
| 91 | |
---|
| 92 | |
---|
| 93 | <font size="-1" color="#006633">required</font> |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | </h4> |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | A floating point or integer number to be |
---|
| 102 | converted into a power of 10. |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | <h3>Keywords</h3> |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | <a name="#_strsci_keyword_Format"></a> |
---|
| 112 | <h4>Format |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>'(f12.2)'</i></font> |
---|
| 120 | |
---|
| 121 | </h4> |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | The format specification used in the string |
---|
| 125 | conversion for the mantissa (i.e. the |
---|
| 126 | "A" of "A x 10^B"). |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | <a name="#_strsci_keyword_POT_Only"></a> |
---|
| 130 | <h4>POT_Only |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | </h4> |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | Will return only the "power of 10" part of the |
---|
| 143 | string (i.e. the "10^B"). Default is to return |
---|
| 144 | the entire string (e.g. "A x 10^B" ) |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | <a name="#_strsci_keyword_MANTISSA_ONLY"></a> |
---|
| 148 | <h4>MANTISSA_ONLY |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | </h4> |
---|
| 158 | |
---|
| 159 | |
---|
| 160 | return only mantissa of the string |
---|
| 161 | |
---|
| 162 | |
---|
| 163 | <a name="#_strsci_keyword_SHORT"></a> |
---|
| 164 | <h4>SHORT |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | </h4> |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | return 10^0 as '1' and 10^1 as '10' |
---|
| 177 | |
---|
| 178 | |
---|
| 179 | <a name="#_strsci_keyword_TRIM"></a> |
---|
| 180 | <h4>TRIM |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | </h4> |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | don't insert blanks (i.e. return Ax10^B) |
---|
| 193 | |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | <h3>Examples</h3> |
---|
| 198 | Result = STRSCI( 2000000, format='(i1)' ) |
---|
| 199 | print, result |
---|
| 200 | ; 6 |
---|
| 201 | ; prints 2 x 10!u6!n, which gets plotted as 2 x 10 |
---|
| 202 | |
---|
| 203 | Result = STRSCI( -0.0001 ) |
---|
| 204 | print, result |
---|
| 205 | ; 4 |
---|
| 206 | ; prints -1.00 x 10!u-4!n, which gets plotted as 1.00 x 10 |
---|
| 207 | |
---|
| 208 | Result = STRSCI( 0d0, format='(f13.8)' ) |
---|
| 209 | print, result |
---|
| 210 | ; |
---|
| 211 | ; prints, 0.00000000 |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | <h3>Version history</h3> |
---|
| 215 | |
---|
| 216 | <h4>Version</h4> |
---|
| 217 | $Id: strsci.pro 157 2006-08-21 09:01:50Z navarro $ |
---|
| 218 | |
---|
| 219 | <h4>History</h4> |
---|
| 220 | bmy, 28 May 1998: VERSION 1.00 B |
---|
| 221 | - now returns string of the form A x 10 |
---|
| 222 | mgs, 29 May 1998: |
---|
| 223 | - bug fix: now allows negative numbers |
---|
| 224 | - keyword MANTISSA_ONLY added |
---|
| 225 | - default format changed to f12.2 |
---|
| 226 | bmy, 02 Jun 1998: |
---|
| 227 | - renamed to STRSCI ("STRing SCIentific notation"), |
---|
| 228 | mgs, 03 Jun 1998: |
---|
| 229 | - added TRIM keyword |
---|
| 230 | mgs, 22 Sep 1998: |
---|
| 231 | - added SHORT keyword |
---|
| 232 | - modified handling of TRIM keyword |
---|
| 233 | mgs, 24 Sep 1998: |
---|
| 234 | - bug fix with SHORT flag |
---|
| 235 | bmy & mgs, 02 Jun 1999: |
---|
| 236 | - now can handle DATA=0.0 correctly |
---|
| 237 | - updated comments |
---|
| 238 | mgs, 03 Jun 1999: |
---|
| 239 | - can now also handle values lt 1 ;-) |
---|
| 240 | - and doesn't choke on arrays |
---|
| 241 | |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | <h3>Known issues</h3> |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | <h4>Restrictions</h4> |
---|
| 249 | This function does not "evaluate" the format statement thoroughly |
---|
| 250 | which can result in somewhat quirky strings. Example: |
---|
| 251 | print,strsci(-9.999) results in -10.0x10^0 instead of -1.0x10^1. |
---|
| 252 | |
---|
| 253 | Need a better symbol than the 'x' for the multiplier... |
---|
| 254 | |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | <font size="-3"><p> </p></font> |
---|
| 265 | <hr size="1" color="#CCCCCC"/> |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0 on Tue Aug 29 14:50:32 2006.</font></p> |
---|
| 271 | |
---|
| 272 | </body> |
---|
| 273 | </html> |
---|