[163] | 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 | |
---|
[234] | 66 | |
---|
[163] | 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | <a name="#_getwrd"></a> |
---|
| 71 | |
---|
| 72 | <h2>getwrd <font size="-1" color="#006633"> |
---|
[234] | 73 | String |
---|
[163] | 74 | </font></h2> |
---|
| 75 | |
---|
[290] | 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> |
---|
[163] | 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
[234] | 81 | <h3>Return value</h3> |
---|
| 82 | wrd = returned word or words. |
---|
[163] | 83 | |
---|
| 84 | |
---|
| 85 | |
---|
| 86 | <h3>Parameters</h3> |
---|
| 87 | |
---|
| 88 | |
---|
[290] | 89 | <a name="#_getwrd_keyword_txtstr"></a> |
---|
| 90 | <h4>txtstr |
---|
[163] | 91 | <font size="-1" color="#006633">in</font> |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | <font size="-1" color="#006633">required</font> |
---|
| 95 | |
---|
[234] | 96 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>string or array of strings</i></font> |
---|
[163] | 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 | |
---|
[290] | 107 | <a name="#_getwrd_keyword_nth"></a> |
---|
| 108 | <h4>nth |
---|
[163] | 109 | <font size="-1" color="#006633">in</font> |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | <font size="-1" color="#006633">required</font> |
---|
| 113 | |
---|
[234] | 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> |
---|
[163] | 116 | |
---|
| 117 | </h4> |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | word number to get (first = 0 = def) |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
[290] | 124 | <a name="#_getwrd_keyword_mth"></a> |
---|
| 125 | <h4>mth |
---|
[163] | 126 | <font size="-1" color="#006633">in</font> |
---|
| 127 | |
---|
[234] | 128 | <font size="-1" color="#006633">optional</font> |
---|
[163] | 129 | |
---|
| 130 | |
---|
[234] | 131 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>integer</i></font> |
---|
[163] | 132 | |
---|
| 133 | |
---|
| 134 | </h4> |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | optional last word number to get. |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | <h3>Keywords</h3> |
---|
| 144 | |
---|
| 145 | |
---|
[290] | 146 | <a name="#_getwrd_keyword_HELP"></a> |
---|
| 147 | <h4>HELP |
---|
[163] | 148 | |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | </h4> |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | |
---|
[290] | 160 | <a name="#_getwrd_keyword_LOCATION"></a> |
---|
| 161 | <h4>LOCATION |
---|
[163] | 162 | |
---|
| 163 | |
---|
| 164 | |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | |
---|
| 170 | </h4> |
---|
| 171 | |
---|
| 172 | |
---|
[402] | 173 | = l. Return word n string location. |
---|
[234] | 174 | |
---|
[163] | 175 | |
---|
[290] | 176 | <a name="#_getwrd_keyword_DELIMITER"></a> |
---|
| 177 | <h4>DELIMITER |
---|
[163] | 178 | |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | </h4> |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | = d. Set word delimiter (def = space & tab). |
---|
[234] | 190 | |
---|
[163] | 191 | |
---|
[290] | 192 | <a name="#_getwrd_keyword_NOTRIM"></a> |
---|
| 193 | <h4>NOTRIM |
---|
[163] | 194 | |
---|
| 195 | |
---|
| 196 | |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | </h4> |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | suppresses whitespace trimming on ends. |
---|
[234] | 206 | |
---|
[163] | 207 | |
---|
[290] | 208 | <a name="#_getwrd_keyword_LAST"></a> |
---|
| 209 | <h4>LAST |
---|
[163] | 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 | |
---|
[290] | 226 | <a name="#_getwrd_keyword_NWORDS"></a> |
---|
| 227 | <h4>NWORDS |
---|
[163] | 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | </h4> |
---|
| 237 | |
---|
| 238 | |
---|
| 239 | = n. Returns number of words in string. |
---|
[234] | 240 | |
---|
[163] | 241 | |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | |
---|
[234] | 245 | </pre><h3>Version history</h3> |
---|
[163] | 246 | |
---|
| 247 | <h4>Version</h4> |
---|
[402] | 248 | $Id: getwrd.pro 374 2008-08-08 15:12:27Z pinsard $ |
---|
[163] | 249 | |
---|
| 250 | <h4>History</h4> |
---|
[402] | 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. |
---|
[163] | 260 | |
---|
| 261 | Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory |
---|
| 262 | This software may be used, copied, or redistributed as long as it is not |
---|
| 263 | sold and this copyright notice is reproduced on each copy made. This |
---|
| 264 | routine is provided as is without any express or implied warranties |
---|
| 265 | whatsoever. Other limitations apply as described in the file disclaimer.txt. |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | <h3>Known issues</h3> |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | <h4>Restrictions</h4> |
---|
| 274 | If a NULL string is given (txt="") then the last string |
---|
| 275 | given is used. This saves finding the words again. |
---|
| 276 | If m > n wrd will be a string of words from word n to |
---|
[402] | 277 | word m. If no m is given wrd will be a single word. |
---|
[163] | 278 | n<0 returns text starting at word abs(n) to string end |
---|
| 279 | If n is out of range then a null string is returned. |
---|
[402] | 280 | See also <a href="../..//ToBeReviewed/STRING/nwrds.html">nwrds</a>. |
---|
[163] | 281 | |
---|
| 282 | |
---|
| 283 | <h3>Other attributes</h3> |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | <h4>Uses routines</h4> |
---|
| 287 | getwrd_com |
---|
[234] | 288 | |
---|
[163] | 289 | |
---|
| 290 | |
---|
| 291 | <h4>Common blocks used</h4>getwrd_com |
---|
| 292 | |
---|
| 293 | <font size="-3"><p> </p></font> |
---|
| 294 | <hr size="1" color="#CCCCCC"/> |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | |
---|
[187] | 299 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
[163] | 300 | |
---|
| 301 | </body> |
---|
[249] | 302 | </html> |
---|