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>filecreate</title> |
<title>filecreate</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>filecreate</h1> |
<h1>filecreate</h1> |
15 |
|
|
16 |
<p> |
<p> |
17 |
ファイルを作成する。 |
ファイルを作成する。 |
18 |
</p> |
</p> |
19 |
|
|
20 |
<pre class="macro-syntax"> |
<pre class="macro-syntax"> |
21 |
filecreate <file handle> <filename> |
filecreate <file handle> <filename> |
22 |
</pre> |
</pre> |
23 |
|
|
24 |
<h2>解説</h2> |
<h2>解説</h2> |
25 |
|
|
26 |
<p> |
<p> |
27 |
ファイル <filename> を新しく作成しオープンする。<br> |
ファイル <filename> を新しく作成しオープンする。<br> |
28 |
ファイルポインタはファイルの先頭にセットされる。すでに同じ名前のファイルが存在する場合、ファイルサイズは0にされる。<br> |
ファイルポインタはファイルの先頭にセットされる。すでに同じ名前のファイルが存在する場合、ファイルサイズは0にされる。<br> |
29 |
もしファイルが正しく作成され、オープンされた場合、ファイルハンドルが整数変数 <file handle> に格納される。それ以外の場合、<file handle> に-1が格納される。<br> |
もしファイルが正しく作成され、オープンされた場合、ファイルハンドルが整数変数 <file handle> に格納される。それ以外の場合、<file handle> に-1が格納される。<br> |
30 |
ファイルの作成が成功した場合、システム変数 result に 0 が格納される。それ以外の場合, result に 0 以外が格納される。<br> |
ファイルの作成が成功した場合、システム変数 result に 0 が格納される。それ以外の場合, result に 0 以外が格納される。<br> |
31 |
<br> |
<br> |
32 |
|
|
33 |
なお、ファイル作成後、ファイルハンドルはオープンされたままとなる。 |
なお、ファイル作成後、ファイルハンドルはオープンされたままとなる。 |
34 |
</p> |
</p> |
35 |
|
|
36 |
<h2>例</h2> |
<h2>例</h2> |
37 |
|
|
38 |
<pre class="macro-example"> |
<pre class="macro-example"> |
39 |
filecreate fhandle 'data.dat' |
filecreate fhandle 'data.dat' |
40 |
fileclose fhandle |
fileclose fhandle |
41 |
</pre> |
</pre> |
42 |
|
|
43 |
</body> |
</body> |
44 |
</html> |
</html> |