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>getwrd.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="getwrd.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//getwrd.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 documentation</td> |
---|
67 | </tr> |
---|
68 | </table> |
---|
69 | |
---|
70 | </div> |
---|
71 | |
---|
72 | <div id="secondary_navbar"> |
---|
73 | |
---|
74 | <a href="getfile.html"><<prev file</a> | <a href="isnumber.html">next file >></a> <a href="getwrd.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> |
---|
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">getwrd.pro</h2> |
---|
83 | |
---|
84 | <div id="file_attr"> |
---|
85 | <dl> |
---|
86 | </dl> |
---|
87 | </div> |
---|
88 | |
---|
89 | <div id="file_comments"> |
---|
90 | Return the n'th word from a text string. |
---|
91 | </div> |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | |
---|
97 | |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | <div id="routine_details"> |
---|
102 | |
---|
103 | |
---|
104 | <div class="routine_details" id="_getwrd"> |
---|
105 | |
---|
106 | <h2><a class="top" href="#container">top</a>getwrd <span class="categories"> |
---|
107 | String |
---|
108 | </span></h2> |
---|
109 | |
---|
110 | <p class="header"> |
---|
111 | <span class="result">result = </span>getwrd(<span class="result"><a href="#_getwrd_param_txtstr">txtstr</a>, <a href="#_getwrd_param_nth">nth</a>[, <a href="#_getwrd_param_mth">mth</a>]</span>, <a href="#_getwrd_keyword_HELP">HELP</a>=<span class="result">HELP</span>, <a href="#_getwrd_keyword_LOCATION">LOCATION</a>=<span class="result">LOCATION</span>, <a href="#_getwrd_keyword_DELIMITER">DELIMITER</a>=<span class="result">DELIMITER</span>, <a href="#_getwrd_keyword_NOTRIM">NOTRIM</a>=<span class="result">NOTRIM</span>, <a href="#_getwrd_keyword_LAST">LAST</a>=<span class="result">LAST</span>, <a href="#_getwrd_keyword_NWORDS">NWORDS</a>=<span class="result">NWORDS</span>)</p> |
---|
112 | |
---|
113 | <div class="comments"> |
---|
114 | </div> |
---|
115 | |
---|
116 | <h3>Return value</h3><div class="preformat"> |
---|
117 | wrd = returned word or words. |
---|
118 | </div> |
---|
119 | |
---|
120 | |
---|
121 | <h3>Parameters</h3> |
---|
122 | |
---|
123 | |
---|
124 | <h4 id="_getwrd_param_txtstr">txtstr |
---|
125 | <span class="attr">in</span> |
---|
126 | |
---|
127 | |
---|
128 | <span class="attr">required</span> |
---|
129 | |
---|
130 | <span class="attr">type:</span> <span class="value">string or array of strings</span> |
---|
131 | |
---|
132 | |
---|
133 | </h4> |
---|
134 | |
---|
135 | <div class="comments"> |
---|
136 | text string to extract from. |
---|
137 | The first element is used if txt is an array. |
---|
138 | </div> |
---|
139 | |
---|
140 | <h4 id="_getwrd_param_nth">nth |
---|
141 | <span class="attr">in</span> |
---|
142 | |
---|
143 | |
---|
144 | <span class="attr">required</span> |
---|
145 | |
---|
146 | <span class="attr">type:</span> <span class="value">integer</span> |
---|
147 | <span class="attr">default:</span> <span class="value">0</span> |
---|
148 | |
---|
149 | </h4> |
---|
150 | |
---|
151 | <div class="comments"> |
---|
152 | word number to get (first = 0 = def) |
---|
153 | </div> |
---|
154 | |
---|
155 | <h4 id="_getwrd_param_mth">mth |
---|
156 | <span class="attr">in</span> |
---|
157 | |
---|
158 | <span class="attr">optional</span> |
---|
159 | |
---|
160 | |
---|
161 | <span class="attr">type:</span> <span class="value">integer</span> |
---|
162 | |
---|
163 | |
---|
164 | </h4> |
---|
165 | |
---|
166 | <div class="comments"> |
---|
167 | optional last word number to get. |
---|
168 | </div> |
---|
169 | |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | |
---|
175 | <h3>Keywords</h3> |
---|
176 | |
---|
177 | <h4 id="_getwrd_keyword_HELP">HELP |
---|
178 | |
---|
179 | |
---|
180 | |
---|
181 | |
---|
182 | |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | </h4> |
---|
187 | |
---|
188 | <div class="comments"></div> |
---|
189 | |
---|
190 | <h4 id="_getwrd_keyword_LOCATION">LOCATION |
---|
191 | |
---|
192 | |
---|
193 | |
---|
194 | |
---|
195 | |
---|
196 | |
---|
197 | |
---|
198 | |
---|
199 | </h4> |
---|
200 | |
---|
201 | <div class="comments"> |
---|
202 | = l. Return word n string location. |
---|
203 | </div> |
---|
204 | |
---|
205 | <h4 id="_getwrd_keyword_DELIMITER">DELIMITER |
---|
206 | |
---|
207 | |
---|
208 | |
---|
209 | |
---|
210 | |
---|
211 | |
---|
212 | |
---|
213 | |
---|
214 | </h4> |
---|
215 | |
---|
216 | <div class="comments"> |
---|
217 | = d. Set word delimiter (def = space & tab). |
---|
218 | </div> |
---|
219 | |
---|
220 | <h4 id="_getwrd_keyword_NOTRIM">NOTRIM |
---|
221 | |
---|
222 | |
---|
223 | |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | </h4> |
---|
230 | |
---|
231 | <div class="comments"> |
---|
232 | suppresses whitespace trimming on ends. |
---|
233 | </div> |
---|
234 | |
---|
235 | <h4 id="_getwrd_keyword_LAST">LAST |
---|
236 | |
---|
237 | |
---|
238 | |
---|
239 | |
---|
240 | |
---|
241 | |
---|
242 | |
---|
243 | |
---|
244 | </h4> |
---|
245 | |
---|
246 | <div class="comments"> |
---|
247 | means n is offset from last word. So n=0 gives |
---|
248 | last word, n=-1 gives next to last, ... |
---|
249 | If n=-2 and m=0 then last 3 words are returned. |
---|
250 | </div> |
---|
251 | |
---|
252 | <h4 id="_getwrd_keyword_NWORDS">NWORDS |
---|
253 | |
---|
254 | |
---|
255 | |
---|
256 | |
---|
257 | |
---|
258 | |
---|
259 | |
---|
260 | |
---|
261 | </h4> |
---|
262 | |
---|
263 | <div class="comments"> |
---|
264 | = n. Returns number of words in string. |
---|
265 | </div> |
---|
266 | |
---|
267 | |
---|
268 | |
---|
269 | |
---|
270 | <h3>Version history</h3> |
---|
271 | |
---|
272 | <h4>Version</h4><div class="preformat"> |
---|
273 | $Id: getwrd.pro 325 2007-12-06 10:04:53Z pinsard $ |
---|
274 | </div> |
---|
275 | <h4>History</h4><div class="preformat"> |
---|
276 | Ray Sterner, 6 Jan, 1985. |
---|
277 | R. Sterner, Fall 1989 --- converted to SUN. |
---|
278 | R. Sterner, Jan 1990 --- added delimiter. |
---|
279 | R. Sterner, 18 Mar, 1990 --- added /LAST. |
---|
280 | R. Sterner, 31 Jan, 1991 --- added /NOTRIM. |
---|
281 | R. Sterner, 20 May, 1991 --- Added common and NULL string. |
---|
282 | R. Sterner, 13 Dec, 1992 --- Made tabs equivalent to spaces. |
---|
283 | R. Sterner, 4 Jan, 1993 --- Added NWORDS keyword. |
---|
284 | R. Sterner, 2001 Jan 15 --- Fixed to use first element if not a scalar. |
---|
285 | Johns Hopkins University Applied Physics Laboratory. |
---|
286 | |
---|
287 | Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory |
---|
288 | This software may be used, copied, or redistributed as long as it is not |
---|
289 | sold and this copyright notice is reproduced on each copy made. This |
---|
290 | routine is provided as is without any express or implied warranties |
---|
291 | whatsoever. Other limitations apply as described in the file disclaimer.txt. |
---|
292 | </div> |
---|
293 | |
---|
294 | |
---|
295 | <h3>Known issues</h3> |
---|
296 | |
---|
297 | |
---|
298 | |
---|
299 | <h4>Restrictions</h4><div class="preformat"> |
---|
300 | If a NULL string is given (txt="") then the last string |
---|
301 | given is used. This saves finding the words again. |
---|
302 | If m > n wrd will be a string of words from word n to |
---|
303 | word m. If no m is given wrd will be a single word. |
---|
304 | n<0 returns text starting at word abs(n) to string end |
---|
305 | If n is out of range then a null string is returned. |
---|
306 | See also nwrds. |
---|
307 | </div> |
---|
308 | |
---|
309 | <h3>Other attributes</h3> |
---|
310 | |
---|
311 | |
---|
312 | <h4>Uses routines</h4><div class="preformat"> |
---|
313 | getwrd_com |
---|
314 | </div> |
---|
315 | |
---|
316 | |
---|
317 | <h4>Common blocks used</h4><div class="preformat">getwrd_com</div> |
---|
318 | |
---|
319 | <h3>Statistics</h3> |
---|
320 | <table class="statistics"> |
---|
321 | <tr><td>McCabe cyclic</td><td> 17</td></tr> |
---|
322 | <tr><td>McCabe essential</td><td> 2</td></tr> |
---|
323 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
324 | </table> |
---|
325 | |
---|
326 | |
---|
327 | </div> |
---|
328 | |
---|
329 | </div> |
---|
330 | |
---|
331 | |
---|
332 | |
---|
333 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
334 | |
---|
335 | </div> |
---|
336 | |
---|
337 | </body> |
---|
338 | </html> |
---|