source: trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/STRING/strsci.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 7.8 KB
Line 
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 (SAXO 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 (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO 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" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../../ToBeReviewed/STRING//strsci.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="strright.html">&lt;&lt;prev file</a> | <a href="strsed.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="strsci.html" target="_TOP">view single page</a> | <a href="./../../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;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">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">
90 Given a number, returns a string of that          B
91 number in scientific notation format ( e.g. A x 10  )
92</div>
93
94     
95
96     
97
98     
99
100     
101
102      <div id="routine_details">
103       
104
105        <div class="routine_details" id="_strsci">
106
107          <h2><a class="top" href="#container">top</a>strsci <span class="categories">
108 String
109</span></h2>
110       
111          <p class="header">
112            <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>
113       
114          <div class="comments">
115</div>
116
117         
118
119         
120            <h3>Parameters</h3>
121       
122           
123            <h4 id="_strsci_param_data">data&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
124              <span class="attr">in</span>
125             
126             
127              <span class="attr">required</span>
128             
129             
130             
131             
132            </h4>
133       
134          <div class="comments">
135 A floating point or integer number to be
136 converted into a power of 10.
137</div>
138           
139
140         
141
142         
143
144            <h3>Keywords</h3>
145           
146            <h4 id="_strsci_keyword_FORMAT">FORMAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147             
148             
149             
150             
151             
152             
153              <span class="attr">default:</span> <span class="value">'(f12.2)'</span>
154             
155            </h4>
156       
157            <div class="comments">
158 The format specification used in the string
159 conversion for the mantissa (i.e. the
160 "A" of "A x 10^B"). 
161</div>
162           
163            <h4 id="_strsci_keyword_POT_ONLY">POT_ONLY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
164             
165             
166             
167             
168             
169             
170             
171             
172            </h4>
173       
174            <div class="comments">
175 Will return only the "power of 10" part of the
176 string (i.e. the "10^B").  Default is to return
177 the entire string (e.g. "A x 10^B" )
178</div>
179           
180            <h4 id="_strsci_keyword_MANTISSA_ONLY">MANTISSA_ONLY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181             
182             
183             
184             
185             
186             
187             
188             
189            </h4>
190       
191            <div class="comments">
192 return only mantissa of the string
193</div>
194           
195            <h4 id="_strsci_keyword_SHORT">SHORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
196             
197             
198             
199             
200             
201             
202             
203             
204            </h4>
205       
206            <div class="comments">
207 return 10^0 as '1' and 10^1 as '10'
208</div>
209           
210            <h4 id="_strsci_keyword_TRIM">TRIM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
211             
212             
213             
214             
215             
216             
217             
218             
219            </h4>
220       
221            <div class="comments">
222 don't insert blanks (i.e. return Ax10^B)
223</div>
224           
225         
226
227          <h3>Examples</h3><div class="preformat">
228        Result = STRSCI( 2000000, format='(i1)' )
229        print, result               
230        ;                                                     6
231        ;     prints 2 x 10!u6!n, which gets plotted as 2 x 10
232       
233        Result = STRSCI( -0.0001 )
234        print, result
235        ;                                                            4
236        ;     prints -1.00 x 10!u-4!n, which gets plotted as 1.00 x 10
237
238        Result = STRSCI( 0d0, format='(f13.8)' )
239        print, result
240        ;
241        ;     prints, 0.00000000
242 
243</div>
244          <h3>Version history</h3>
245         
246          <h4>Version</h4><div class="preformat">
247 $Id: strsci.pro 325 2007-12-06 10:04:53Z pinsard $
248
249 Copyright (C) 1998, 1999 Bob Yantosca and Martin Schultz,
250 Harvard University
251 This software is provided as is without any warranty
252 whatsoever. It may be freely used, copied or distributed
253 for non-commercial purposes. This copyright notice must be
254 kept with any copy of this software. If this software shall
255 be used commercially or sold as part of a larger package,
256 please contact the author to arrange payment.
257 Bugs and comments should be directed to bmy@io.harvard.edu
258 or mgs@io.harvard.edu with subject "IDL routine strsci"</div>
259          <h4>History</h4><div class="preformat">
260        bmy, 28 May 1998: VERSION 1.00            B
261           - now returns string of the form A x 10
262        mgs, 29 May 1998:
263           - bug fix: now allows negative numbers
264           - keyword MANTISSA_ONLY added
265           - default format changed to f12.2
266        bmy, 02 Jun 1998:
267           - renamed to STRSCI ("STRing SCIentific notation"),
268        mgs, 03 Jun 1998:
269           - added TRIM keyword
270        mgs, 22 Sep 1998:
271           - added SHORT keyword
272           - modified handling of TRIM keyword
273        mgs, 24 Sep 1998:
274           - bug fix with SHORT flag
275        bmy & mgs, 02 Jun 1999:
276           - now can handle DATA=0.0 correctly
277           - updated comments
278        mgs, 03 Jun 1999:
279           - can now also handle values lt 1 ;-)
280           - and doesn't choke on arrays
281</div>
282         
283         
284          <h3>Known issues</h3>
285         
286         
287         
288          <h4>Restrictions</h4><div class="preformat">
289 This function does not "evaluate" the format statement thoroughly
290 which can result in somewhat quirky strings. Example:
291 print,strsci(-9.999) results in -10.0x10^0 instead of -1.0x10^1.
292
293 Need a better symbol than the 'x' for the multiplier...
294</div>
295       
296         
297         
298         
299         
300         
301         
302         
303       
304          <h3>Statistics</h3>
305          <table class="statistics">
306            <tr><td>McCabe cyclic</td><td>          15</td></tr>
307            <tr><td>McCabe essential</td><td>           1</td></tr>
308            <tr><td>McCabe modular design</td><td>           1</td></tr>
309          </table>
310         
311       
312        </div>
313       
314      </div>
315
316     
317
318      <div id="tagline">Produced by IDLdoc 2.0.</div>
319
320    </div>
321
322  </body>
323</html>
Note: See TracBrowser for help on using the repository browser.