通常のファイル入力/出力に加え、論理ストリームに対する入出力ができます。ストリームには、fileストリーム、stringストリーム、nullストリームの3種類があります。すべての入出力述語にはオプションのパラメータがあり、通常の入出力先であるcurrent_inputとcurrent_outputの代わりに使用するストリーム識別子を指定することができます。前節で述べたように、current_inputおよびcurrent_outputは、述語see/seeing/seen/あるいは/tell/telling/toldで変更できます。...
移動
次へ 前へ
上へ 最上
参考
ユーザの入/出力
ファイルの入/出力
ストリームの入/出力
イフコンピュータ > IF/Prolog > マニュアル > IF/Prolog V4.1 マニュアル > ユーザーズ・ガイド > 初めてのPrologのセッションのための準備 > 入力/出力 > ストリームの入/出力

ストリームの入/出力

MINERVA superseeded IF/Prolog. Please see http://www.ifcomputer.co.jp/MINERVA for details.

We discontinued to sell IF/Prolog Dec 31. 2003. For current customers, we continue to provide professional support for IF/Prolog until Dec 31, 2008.

通常のファイル入力/出力に加え、論理ストリームに対する入出力ができます。ストリームには、fileストリーム、stringストリーム、nullストリームの3種類があります。すべての入出力述語にはオプションのパラメータがあり、通常の入出力先であるcurrent_inputとcurrent_outputの代わりに使用するストリーム識別子を指定することができます。前節で述べたように、current_inputおよびcurrent_outputは、述語see/seeing/seen/あるいは/tell/telling/toldで変更できます。

次の例では、文字列にデータを送っています。

?- open(teststring, string(s), output ).

yes ?- write(teststring, 'This is a test n').

yes ?- stream_control(teststring, output(S)).

S = 'This is a test n' _ <-- ここで改行を押して下さい。

yes ?- _

ストリームの概念については、レファレンスマニュアルのストリームの項目を参照して下さい。

続く..
IF/Prolog by Siemens
言語
English
Japanese
German
サーバー
USA
Japan
サイトマップ
索引
目次
全体目次
全体索引
印刷向き
imode
PDA
探索
document: http://www.ifcomputer.co.jp/IFProlog/Manuals/v4.1/user_guide/prepare/inout/stream/home_jp.html
published 2008/9/1 update 1995/11/7 (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