イフコンピュータ > IF/Prolog > マニュアル > IF/Prolog V4.1 マニュアル > IF/Prolog V4.1 レファレンスマニュアル > バージョン3から4への移行 > ttyread

ttyread

IF/Prolog by Siemens
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.

ttyread(-項) ttyread(-項,-変数リスト)

これらの述語は、read/1とread/2に類似しています。

ttyread/1,/2は、次のPrologの項を標準入力から読み込みます。標準入力は、IF/Prolog起動時にリダイレクトされなければキ−ボ−ドです。

さらにttyread/2は、読み込まれた変数の名前と内部名のリストを返します。

?- see(myfile),write('How many files to be read? '), ttyread(X), ..., seen.

How many files to be read? 20.

X = 20

yes ?- ttyread(X,Vars). part( No, size( 100, Len ) ). X = part( _1348, size( 100, _1352 ) ) Vars = [ 'No' = _1348, 'Len' = _1352 ]

yes ?-

document: http://www.ifcomputer.co.jp/IFProlog/Manuals/v4.1/reference/compaintro/ttyread/print_jp.html
published 2008/12/1 update 1995/11/6 (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