移動
次へ 前へ
上へ 最上
参考
match/2/3
match_all/3
substitute/4
substitute_all/4
chop/2
split/2/3
get_line/1/2
イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > 文書処理と正規表現 > get_line/1/2

get_line/1/2

get_line(-result)

get_line(+stream, -result)

get_line/1/2 行を1行読み込みます。ファイルの終了時には失敗します。

引数

	result		atom
	stream		atom

ファイルをコピーします。minerva -l copyfile aaa.txt bbb.txtで呼び出してください。
	main([Infile,Outfile|_]) :-
	        open(Infile,read,Instream),
	        open(Outfile,write,Outstream),
	        copy(Instream,Outstream),
	        close(Instream),
	        close(Outstream).

copy(Instream,Outstream) :- get_line(Instream,Line), write(Outstream,Line),nl(Outstream), copy(Instream,Outstream). copy(_Instream,Outstream) :- flush_output(Outstream).

標準

この述語は、ISO-Prolog標準に含まれない。

See also

regular expression, match/2/3, match_all/3, substitute/4, substitute_all/4, split/2/3, chop/2, get_line/1/2,

続く..
MINERVA
ifcomputer logo
f
Expert Services on the Web
言語
English
Japanese
サーバー
USA
Japan
サイトマップ
索引
目次
全体目次
全体索引
印刷向き
imode
PDA
探索
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/regexp/get_line/home_jp.html
published 2008/10/6 update 2002/3/20 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 start (AT) ifcomputer.com
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
冒頭へ managed with ubiCMS