Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3227 - (hide annotations) (download) (as text)
Tue Mar 24 15:10:33 2009 UTC (15 years, 2 months ago) by maya
File MIME type: text/html
File size: 1312 byte(s)
CVS から SVN へ移行: 改行コードを LF から CR+LF へ変換
1 maya 3227 <!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=Shift_JIS">
6     <title>filereadln</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>filereadln</h1>
15    
16     <p>
17     ファイルから一行読む。
18     </p>
19    
20     <pre class="macro-syntax">
21     filereadln &lt;file handle&gt; &lt;strvar&gt;
22     </pre>
23    
24     <h2>解説</h2>
25    
26     <p>
27     ファイルハンドル &lt;file handle&gt; で指定されるファイルから一行読む。<br>
28     読み込まれた行は、文字列変数 &lt;strvar&gt; に格納される。<br>
29     ファイルポインタは次の行の始めへ移動する。もし、行を読んでいる間にファイルポインタがファイルの<br>
30     最後に達した場合、システム変数 result に 1 が格納される。それ以外の場合、result に 0 が格納される。<br>
31    
32     改行のみの場合は、文字列変数は空となり、result には 0 が格納される。
33    
34     </p>
35    
36     <h2></h2>
37    
38     <pre class="macro-example">
39     ; ファイルオープン
40     fileopen fhandle 'test.txt' 0
41    
42     :loop
43     ; 一行読み込み
44     <strong>filereadln</strong> fhandle line
45     if result goto fclose
46     ; 読み込んだ行を表示
47     messagebox line 'test.txt'
48     ; ファイル最後まで繰り返す
49     goto loop
50    
51     :fclose
52     ; ファイルクローズ
53     fileclose fhandle
54     </pre>
55    
56     </body>
57     </html>

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