| ||||||||||
| 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. xtAddTimeOut(+TimeOutName, +Interval, +TimeOutPredicate, +ClientData) xtRemoveTimeOut(TimeOutName) intrinsicsのXtAdd/RemovetimeOut()と同様の働きをします。 xtAddTimeOut/4は、Intervalミリ秒後に呼び出されるべきTimeOutPredicate/2を登録します。 TimeOutPredicateは、2つの引数をもつ述語でなければなりません。これは以下のように、タイムアウトイベントがディスパッチされた時に呼び出されます。 TimeOutPredicate(TimeOutName, ClientData). TimeOutPredicateが1度呼び出されると、タイムアウトは削除されます。周期的に呼び出したい場合には、タイムアウトをコ−ルバック中で登録し直さなければなりません。 TimeOutPredicateは失敗してはならず、失敗した場合には例外"timeout_predicate_failed"が結果として起こります。 [user].
| write_timeout(TimeOutName, ClientData) :-
write(' time_out callback '),
write(TimeOutName),
write(' with client_data '),
write(ClientData),
nl.
|EOF
yes
?- xtAddTimeOut(time_out_5000, 5000,
write_timeout, xxx ),
xtMainLoop.
< after 5 seconds >
time_out callback time_out_5000 with client_data xxx
yes ?- _ <xtAddtimeOut/4> integer_expected Intervalは整数でなければならない timeout_name_already_used TimeOutNameで指定したタイムアウトがすでに存在している illegal_timeout_predicate TimeOutPredicate/2が存在していない <xtRemoveTimeOut/1> illegal_timeout この名前のタイムアウトは登録されていない | ||||||||||
|
| Back> |
|