=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/builtin/io.texi,v retrieving revision 1.13 retrieving revision 1.17 diff -u -p -r1.13 -r1.17 --- OpenXM/src/asir-doc/parts/builtin/io.texi 2003/11/27 15:56:08 1.13 +++ OpenXM/src/asir-doc/parts/builtin/io.texi 2014/04/09 05:34:30 1.17 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/io.texi,v 1.12 2003/11/01 23:58:44 takayama Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/io.texi,v 1.16 2008/07/17 15:01:10 iwane Exp $ \BJP @node 入出力,,, 組み込み函数 @section 入出力 @@ -17,6 +17,7 @@ * bload27:: * print:: * access:: +* remove_file:: * open_file close_file get_line get_byte put_byte purge_stdin:: @end menu @@ -100,6 +101,11 @@ line of the input file is strongly recommended. 実際のプログラムの書き方は, @pxref{ユーザ言語 Asir}. テキストファイルを読み込む場合, @code{cpp} を通すので, C のプログラム同様 @code{#include}, @code{#define} を使うことができる. +unix 版では, システムにインストールされている @code{cpp} を利用している. +Windows 版では @code{mcpp} @url{http://mcpp.sourceforge.net} を用いている. +これには行の長さに制限があるので注意. +unix/OpenXM 版(Mac 用 cfep/asir を含む)では @code{OpenXM/bin/ox_cpp} を用いている. +これは Portable C compiler @url{http://pcc.ludd.ltu.se} に附属する @code{cpp} である. @item 指定したファイルが存在した時には 1 を返し, 存在しなかった時は 0 を返す. @item @@ -126,6 +132,12 @@ See @ref{User language Asir} for practical programming Since text files are read through @code{cpp}, the user can use, as in C programs, @code{#include} and @code{#define} in @b{Asir} program source codes. +The @code{cpp} which is installed to the system with a C compler is used in the unix version. +The @code{mcpp} @url{http://mcpp.sourceforge.net} is used in the Windows version. +Note that the length of a line has a limit for an input @code{mcpp}. +The @code{OpenXM/bin/ox_cpp} is used in the unix/OpenXM version +(including cfep/asir for MacOS X). +This is the @code{cpp} distributed with the Portable C compiler @url{http://pcc.ludd.ltu.se}. @item It returns 1 if the designated file exists, 0 otherwise. @item @@ -493,7 +505,7 @@ On Windows one has to use @samp{/} as the separator of @var{obj} を評価して表示する. @item 第 2 引数がないか, または 0, 2 以外の場合, 改行する. -第 2 引数が 1 の場合, 改行せず, 出力はバッファに書き込まれ, +第 2 引数が 0 の場合, 改行せず, 出力はバッファに書き込まれ, バッファはフラッシュされない. 第 2 引数が 2 の場合, 改行しないがバッファはフラッシュされる. @item @@ -535,7 +547,7 @@ xyz123gahaha @end example \JP @node access,,, 入出力 -\EG @node aceess,,, Inputs and Outputs +\EG @node access,,, Inputs and Outputs @subsection @code{access} @findex access @@ -547,7 +559,7 @@ xyz123gahaha @table @var @item return -0 or 1 +(1|0) @item file \JP ファイル名 \EG filename @@ -560,6 +572,25 @@ xyz123gahaha \E @end itemize +\JP @node remove_file,,, 入出力 +\EG @node remove_file,,, Inputs and Outputs +@subsection @code{remove_file} +@findex remove_file + +@table @t +@item remove_file(@var{file}) +\JP :: @var{file} を消去する. +\EG :: Delete an file @var{file}. +@end table + +@table @var +@item return +1 +@item file +\JP ファイル名 +\EG filename +@end table + \JP @node open_file close_file get_line get_byte put_byte purge_stdin,,, 入出力 \EG @node open_file close_file get_line get_byte put_byte purge_stdin,,, Inputs and Outputs @subsection @code{open_file}, @code{close_file}, @code{get_line}, @code{get_byte}, @code{put_byte}, @code{purge_stdin} @@ -586,7 +617,6 @@ xyz123gahaha @item put_byte(@var{num},@var{c}) \JP :: 識別子 @var{num} のファイルに 1 バイト @var{c} を書く. \EG :: Writes a byte @var{c} to the file indicated by a descriptor @var{num}. -@item purge_stdin() @item purge_stdin() \JP :: 標準入力のバッファをクリアする. \EG :: Clears the buffer for the standard input.