いつも成功する。...
移動
次へ 前へ
上へ 最上
参考
abort/0
::(Apply)/2
break
call/1
fcall/1
catch/3
','(Conjunction)/2
!(Cut)/0
';'(Disjunction)/2
<-(Eval)/2
fail/0
halt/0/1
->(If-then)/2
';'(If-then-else)/2
'\+'/1
once/1
repeat/0
throw/1
true/0
イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > 論理と制御 > repeat/0

repeat/0

いつも成功する。

repeat

repeat/0 は、繰り返し、無限に成功する。true/0 との違いは、バックトラックされることです。

repeat/0 で定義されるループは、繰り返すので、カット ('!'/0)でのみ終了する。
もし、repeat/0のあとでコールされた述語がいつも失敗すれば、無限ループが出来る。もし、、repeat/0 がconjunction (','/2) のあとで続けば、 その左部分はバックトラックされない。

repeat, write('indefinitely'), nl, fail. 無限に'indefinitely' を現在出力ストリームに書く。
repeat,!. 成功.
repeat,!,fail. 失敗.

標準

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

関連

abort/0, break/0, call/1, _call/1, catch/3, ','(conjunction)/2, '!'(cut)/0, ';'(disjunction)/2, fail/0, true/0, halt/0/1, '->'(if-then)/2, ';'(if-then-else)/2, '\+'(not provable)/1, once/1, throw/1.

続く..
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/logic_and_control/repeat/home_jp.html
published 2008/6/30 update 2001/2/7 (c) 1996-2006 IF Computer Japan
IF Computer 〒113-0022 Tel 03-5814-3352 ifcj@ifcomputer.co.jp
Customer Support 東京都文京区千駄木5-28-2   http://www.ifcomputer.co.jp
冒頭へ managed with ubiCMS