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