イフコンピュータ > MINERVA > マニュアル > レファレンス > 述語 > 論理と制御 > throw/1

throw/1

MINERVA
ifcomputer logo
f
Expert Services on the Web

エラーを起こし、そのリープをキャッチできる一番近い地点に戻る。

throw(+項)

throw/1 は、現在実行手続きの実行をやめ、 そのリープをキャッチできる一番近い地点に戻る。 そのキャッチ点は、 'catch(ゴール, キャッチマスク, 回復ゴール)'によってつくられる。 もし、キャッチマスク と単一化可能であれば、 catch/3 の結果は、回復ゴールの結果となる。
もし、キャッチ点が見つからなければ、throw/1 は MINERVAを終了する。

引数

項                   項

catch(throw(true),X,write('return to catch-point')). X <- true の代入で成功し、
'return to catch-point' を現在出力ストリームに書く。

標準

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

関連

abort/0, break/0, call/1, fcall/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, repeat/0.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/logic_and_control/throw/print_jp.html
published 2008/10/6 update 2001/2/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