source: trunk/SRC/Documentation/idldoc_assistant_output/ToBeReviewed/STRING/chkeywd.html @ 242

Last change on this file since 242 was 242, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers + replace some message by some report

File size: 6.1 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>chkeywd.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=""><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="delchr.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>chkeywd.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 In a string containing an order to execute with EXECUTE by example.
65 We change the value of one of keywords.
66 More generally, in a string, we look for the character chain: ', keywdname= ...,
67 and we change the value of...
68
69
70   
71
72     
73      <a name="#_chkeywd"></a>
74
75      <h2>chkeywd  <font size="-1" color="#006633">
76 String, keywords
77</font></h2>
78
79      <p><font face="Courier"><i>result = </i>chkeywd(<i><a href="#_chkeywd_keyword_stringin">stringin</a>, <a href="#_chkeywd_keyword_keywdname">keywdname</a>, <a href="#_chkeywd_keyword_keywdvalue">keywdvalue</a></i>, <a href="#_chkeywd_keyword_SEPARATOR">SEPARATOR</a>=<i>SEPARATOR</i>, <a href="#_chkeywd_keyword_AFTER">AFTER</a>=<i>AFTER</i>)</font></p>
80
81   
82
83
84    <h3>Return value</h3>
85 stringout=stringin modified if keywdname has been found in stringin
86
87
88   
89    <h3>Parameters</h3>
90   
91
92    <a name="#_chkeywd_keyword_stringin"></a>
93    <h4>stringin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
94      <font size="-1" color="#006633">in</font>
95     
96     
97      <font size="-1" color="#006633">required</font>
98     
99      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>string</i></font>
100     
101     
102    </h4>
103
104   
105 it is a string
106
107   
108
109    <a name="#_chkeywd_keyword_keywdname"></a>
110    <h4>keywdname&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
111      <font size="-1" color="#006633">in</font>
112     
113     
114      <font size="-1" color="#006633">required</font>
115     
116      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>string</i></font>
117     
118     
119    </h4>
120
121   
122 it is a string designating the name of keyword to look for.
123
124   
125
126    <a name="#_chkeywd_keyword_keywdvalue"></a>
127    <h4>keywdvalue&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
128      <font size="-1" color="#006633">in</font>
129     
130     
131      <font size="-1" color="#006633">required</font>
132     
133     
134     
135     
136    </h4>
137
138   
139 The new value of the keyword to considerate in STRINGIN
140
141   
142   
143
144   
145    <h3>Keywords</h3>
146
147   
148    <a name="#_chkeywd_keyword_SEPARATOR"></a>
149    <h4>SEPARATOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150     
151     
152     
153     
154     
155     
156     
157     
158    </h4>
159
160   
161 To look for the keyword, we look for the first sign = which follow
162 the position of keywdname. By default, we substitute the string
163 before the comma. With the keyword SEPARATOR,we can modify the cut
164 of the string. SEPARATOR give a Character before the one we have to
165 look for the comma which delimit the keyword in the string.
166 (see examples)
167
168   
169    <a name="#_chkeywd_keyword_AFTER"></a>
170    <h4>AFTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
171     
172     
173     
174     
175     
176     
177     
178     
179    </h4>
180
181   
182 To look for the keyword, we look for the first sign = which follow
183 the position of keywdname. By default, we substitute the string
184 before the comma. With the keyword AFTER,we can modify the cut
185 of the string. AFTER give a Character after the one we have to
186 look for the comma which delimit the keyword in the string.
187 (see examples)
188
189   
190   
191
192    <h3>Examples</h3><pre>
193
194   IDL> b='ok=111, year=[1997,1998,1999], age_capitaine=35'
195   IDL> print, b
196   ok=111, year=[1997,1998,1999], age_capitaine=35
197   IDL> print, chkeywd(b,'ok','c''est bon')
198   ok='c''est bon', year=[1997,1998,1999], age_capitaine=35
199   IDL> print, chkeywd(b,'YEAR',indgen(5),sep='=')
200   ok=111, year=[0,1,2,3,4], age_capitaine=35
201   IDL> print, chkeywd(b,'YEAR',indgen(5),sep=']',/after)
202   ok=111, year=[0,1,2,3,4], age_capitaine=35
203   IDL> b='ok=111, /year, /age_capitaine'
204   IDL> print, chkeywd(b,'year','c''est bon')
205   ok=111, year='c''est bon', /age_capitaine
206
207    </pre><h3>Version history</h3>
208   
209    <h4>Version</h4>
210 $Id: chkeywd.pro 238 2007-03-27 13:43:18Z pinsard $
211
212    <h4>History</h4>
213 Sebastien Masson (smasson@lodyc.jussieu.fr)
214                      18/10/1999
215                      24/11/1999: adaptation for keywords starting by /
216
217   
218
219    <h3>Known issues</h3>
220   
221   
222   
223    <h4>Restrictions</h4>
224 If keywdvalue is an array, it will be convert in a vector.
225
226
227 Beware, this function has loops, ifs ad cases everywhere. So it can
228 not be used by big keywords (with a lot of elements which are big
229 arrays). The input keyword must not contain Complex floatings, structure,
230 Double-precision complex, Pointer, Object reference, Unsigned Integer,
231 Unsigned Longword Integer, 64-bit Integer or Unsigned 64-bit Integer.
232
233
234
235    <h3>Other attributes</h3>
236   
237   
238    <h4>Uses routines</h4>
239 common.pro
240
241   
242   
243   
244
245    <font size="-3"><p>&nbsp;</p></font>
246    <hr size="1" color="#CCCCCC"/>
247     
248
249   
250
251    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
252
253  </body>
254</html>
Note: See TracBrowser for help on using the repository browser.