Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Diff of /trunk/doc/jp/html/macro/command/filereadln.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3221 by maya, Tue Mar 24 09:37:20 2009 UTC revision 3227 by maya, Tue Mar 24 15:10:33 2009 UTC
# Line 1  Line 1 
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">    "http://www.w3.org/TR/html4/strict.dtd">
3  <html>  <html>
4  <head>  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">    <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
6    <title>filereadln</title>    <title>filereadln</title>
7    <meta http-equiv="Content-Style-Type" content="text/css">    <meta http-equiv="Content-Style-Type" content="text/css">
8    <link rel="stylesheet" href="../../style.css" type="text/css">    <link rel="stylesheet" href="../../style.css" type="text/css">
9  </head>  </head>
10    
11  <body>  <body>
12    
13    
14  <h1>filereadln</h1>  <h1>filereadln</h1>
15    
16  <p>  <p>
17  ファイルから一行読む。  ファイルから一行読む。
18  </p>  </p>
19    
20  <pre class="macro-syntax">  <pre class="macro-syntax">
21  filereadln &lt;file handle&gt; &lt;strvar&gt;  filereadln &lt;file handle&gt; &lt;strvar&gt;
22  </pre>  </pre>
23    
24  <h2>解説</h2>  <h2>解説</h2>
25    
26  <p>  <p>
27  ファイルハンドル &lt;file handle&gt; で指定されるファイルから一行読む。<br>  ファイルハンドル &lt;file handle&gt; で指定されるファイルから一行読む。<br>
28  読み込まれた行は、文字列変数 &lt;strvar&gt; に格納される。<br>  読み込まれた行は、文字列変数 &lt;strvar&gt; に格納される。<br>
29  ファイルポインタは次の行の始めへ移動する。もし、行を読んでいる間にファイルポインタがファイルの<br>  ファイルポインタは次の行の始めへ移動する。もし、行を読んでいる間にファイルポインタがファイルの<br>
30  最後に達した場合、システム変数 result に 1 が格納される。それ以外の場合、result に 0 が格納される。<br>  最後に達した場合、システム変数 result に 1 が格納される。それ以外の場合、result に 0 が格納される。<br>
31    
32  改行のみの場合は、文字列変数は空となり、result には 0 が格納される。  改行のみの場合は、文字列変数は空となり、result には 0 が格納される。
33    
34  </p>  </p>
35    
36  <h2>例</h2>  <h2>例</h2>
37    
38  <pre class="macro-example">  <pre class="macro-example">
39  ; ファイルオープン  ; ファイルオープン
40  fileopen fhandle 'test.txt' 0  fileopen fhandle 'test.txt' 0
41    
42  :loop  :loop
43  ; 一行読み込み  ; 一行読み込み
44  <strong>filereadln</strong> fhandle line  <strong>filereadln</strong> fhandle line
45  if result goto fclose  if result goto fclose
46  ; 読み込んだ行を表示  ; 読み込んだ行を表示
47  messagebox line 'test.txt'  messagebox line 'test.txt'
48  ; ファイル最後まで繰り返す  ; ファイル最後まで繰り返す
49  goto loop  goto loop
50    
51  :fclose  :fclose
52  ; ファイルクローズ  ; ファイルクローズ
53  fileclose fhandle  fileclose fhandle
54  </pre>  </pre>
55    
56  </body>  </body>
57  </html>  </html>

Legend:
Removed from v.3221  
changed lines
  Added in v.3227

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