Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Contents of /trunk/doc/en/html/macro/command/findoperations.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1034 - (show annotations) (download) (as text)
Tue Oct 21 00:30:15 2008 UTC (15 years, 7 months ago) by maya
Original Path: doc/trunk/en/html/macro/command/findoperations.html
File MIME type: text/html
File size: 2345 byte(s)
macro-example の中にある code を削除した。

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <title>findfirst, findnext, findclose</title>
7 <meta http-equiv="Content-Style-Type" content="text/css">
8 <link rel="stylesheet" href="../../style.css" type="text/css">
9 </head>
10
11 <body>
12
13
14 <h1>findfirst</h1>
15
16 <p>
17 Searches for the first file matching a string.
18 </p>
19
20 <pre class="macro-syntax">
21 findfirst &lt;dir handle&gt; &lt;file name&gt; &lt;strvar&gt;
22 </pre>
23
24 <h2>Remarks</h2>
25
26 <p>
27 The findfirst command searches for the first file matching the specified file name &lt;file name&gt;.<br>
28 If the file is found, this command returns the directory handle in &lt;dir handle&gt;, returns the first file name in &lt;strvar&gt; and sets the system variable "result" to 1.<br>
29 Otherwise, &lt;dir handle&gt;, &lt;strvar&gt; and "result" are set to -1, "" and 0, respectively.<br>
30 If the findfirst command find the first file successfully, the directory handle can be used for the findnext command to search for the next file matching the specified &lt;file name&gt;.<br>
31 <strong>The directory handle should be released by the findclose command.</strong>
32 </p>
33
34
35 <h1>findnext</h1>
36
37 <p>
38 Searches for the next file matching a string.
39 </p>
40
41 <pre class="macro-syntax">
42 findnext &lt;dir handle&gt; &lt;strvar&gt;
43 </pre>
44
45 <h2>Remarks</h2>
46
47 <p>
48 The findnext command searches for the next file matching the file name specified in the findfirst command.<br>
49 The integer value &lt;dir handle&gt; should be the directory handle returned by the findfirst command.<br>
50 If the next file is found, the file name is returned in &lt;strvar&gt; and "result" is set to 1.<br>
51 Otherwise, &lt;strvar&gt; and "result" are set to "" and 0, respectively.
52 </p>
53
54
55 <h1>findclose</h1>
56
57 <p>
58 Releases a directory handle.
59 </p>
60
61 <pre class="macro-syntax">
62 findclose &lt;dir handle&gt;
63 </pre>
64
65 <h2>Remarks</h2>
66
67 <p>
68 The findclose command releases the directory handle &lt;dir handle&gt; returned by the findfirst command.<br>
69 This command should be executed if the findfirst command is executed successfully.
70 </p>
71
72 <h2>Example</h2>
73
74 <pre class="macro-example">
75 findfirst dh '*.txt' filename
76
77 while result
78 messagebox filename '*.txt'
79 findnext dh filename
80 endwhile
81
82 findclose dh
83 </pre>
84
85 </body>
86 </html>

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26