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

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

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