|
|
|
| See also |
|
バージョン3から4への移行
|
|
イントロダクション
|
|
abolish
|
|
abort
|
|
# append
|
|
arg
|
|
計算式(arithmetic)
|
|
アリティ(arity)
|
|
ASCII文字
|
|
assert
|
|
asserta_term, asserto_term, assertz_term
|
|
atom, atomic_length
|
|
\(バックスラッシュ)
|
|
#bagof, #setof
|
|
block, exit_block, cut_block
|
|
break
|
|
bye
|
|
call, execute
|
|
文字セット, char_code
|
|
#clause, #clause_term
|
|
clear_eol, clear_eos, clear_screen
|
|
close
|
|
コメント
|
|
compare
|
|
項の比較
|
|
値の比較
|
|
compiles
|
|
concat
|
|
連言(conjunction)
|
|
consult
|
|
コントロールスタック(control stack)
|
|
データの型変換(conversion)
|
|
copy_term
|
|
correct
|
|
cpu時間
|
|
#current_predicate, #current_atom, current_language
|
|
!(カット)
|
|
データベース(database)
|
|
debug, nodebug, debug_goal
|
|
debug_mode
|
|
decompcons
|
|
指令(directives)
|
|
選言(disjunction)
|
|
display
|
|
編集(edit)
|
|
終了(end)
|
|
end_of_file文字
|
|
equiv_char, image_length, byte_length
|
|
例外処理(exceptions)
|
|
error_protect, exception, exception_handler
|
|
exists
|
|
exit
|
|
expand_term, phrase(+ゴール,?リスト)
|
|
?- export, ?- common, ?- import, ?-hidden
|
|
事実(fact)
|
|
fail
|
|
filepos, files, flush, reset_streams
|
|
findall
|
|
float_format
|
|
# for
|
|
functor
|
|
gc
|
|
get, get0, get_until
|
|
getchar
|
|
getenv, get_home, get_last, move_cursor
|
|
get_global, # global_variable
|
|
ゴール(goal)
|
|
文法規則(grammar rules)
|
|
リストの先頭(head of list)
|
|
節のヘッド(head of clause)
|
|
help
|
|
ifprolog
|
|
ifsem
|
|
include
|
|
index
|
|
入力ストリーム(input stream)
|
|
インタプリタレベル(interpreter level)
|
|
is
|
|
length, #reverse
|
|
list_mode, listing
|
|
リスト(lists)
|
|
load, loaded
|
|
localtime
|
|
ループ(loops)
|
|
lower_upper, national_letters
|
|
make_atom, make_number
|
|
match, # match
|
|
# member
|
|
modify_mode
|
|
?- module, ?- module_body
|
|
name
|
|
nl
|
|
:- nonotify, nonotify
|
|
not
|
|
number
|
|
once
|
|
オペレータ(operator)
|
|
op, # current_op
|
|
outpos, outtab
|
|
出力ストリーム(output stream)
|
|
program_parameters, system_parameters, user_parameters
|
|
parse_atom
|
|
parse_position
|
|
predicate, predicate_mode
|
|
predicate_type
|
|
print
|
|
手続き(procedure)
|
|
program
|
|
# prolog_flag
|
|
prolog_library
|
|
prolog_system, prolog_version, proroot
|
|
put
|
|
put_byte, get_byte
|
|
raise_error
|
|
read, read_term
|
|
read_error, report_read_error
|
|
reconsult(+ファイル名)
|
|
# repeat
|
|
#retract
|
|
retractop
|
|
save_system, save_module
|
|
see, seeing, seen
|
|
set_global
|
|
set_home, setoutpos, setupterm
|
|
signal, signal_handler, alarm
|
|
skip
|
|
sort, keysort
|
|
spy
|
|
dbsize, ssize, gused, dbused, tused, lused
|
|
statistics
|
|
open, close, stream_control, #current_stream, link_stream
|
|
文字列(strings)
|
|
複合項(structures)
|
|
subatomic
|
|
sum, inc
|
|
symbol
|
|
計算式の構文(syntax of arithmetic expression)
|
|
構文チェッカー(syntax checker)
|
|
syntax_error
|
|
項の構文 (Syntax of terms)
|
|
system
|
|
system_date, system_time
|
|
system_predicate
|
|
tab
|
|
tell, telling, told
|
|
項(term)
|
|
X is time
|
|
trace, notrace, trace_mode, trace_goal
|
|
trace, tracing, traced
|
|
トレイル(trail)
|
|
true
|
|
tty_size
|
|
type_of, atom, nonvar, atomic, numeric, digit, realn, integer, struct, letter, var
|
|
未定義の述語(undefined_predicate)
|
|
?項1 = ?項2, +項1 \= +項2
|
|
?複合項 =.. -Univリスト, -複合項 =.. ?Univリスト
|
|
unload
|
|
unset_global
|
|
user
|
|
変数(variables)
|
|
write
|
|
|
|
IF Computer
>
IF/Prolog
>
Manuals
>
IF/Prolog V4.1 マニュアル
>
IF/Prolog V4.1 レファレンスマニュアル
>
read_error, report_read_error
|
read_error, report_read_error
|
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.
read_error(-位置,-エラーコード)
report_read_error(+新スイッチ)
report_read_error(-旧スイッチ,+新スイッチ)
構文エラ−が起きるとread_error/2は、エラ−のある行の番号を「位置」に、また構文エラ−の型を示す整数コ−ドを「エラ−コ−ド」に与えます(このコ−ドについてはsyntax_error/2を参照して下さい)。
read_error/2を使ってエラ−を調べるためには、次に行なう読み込みの前に呼び出されなければなりません。インタプリタへのコマンドの入力も、読み込みのひとつになるので注意して下さい!この述語はreport_read_error/1,/2によって、エラ−メッセ−ジの自動出力がオフに切り換えられている場合にのみ使用できます。
以下の例では、構文解析の失敗によってバックトラッキングが起こった場合だけエラ−をトラップするようにするために論理和';'を使っています。
report_read_error/1,/2は、「新スイッチ」に従ってエラ−リポ−トをオンあるいはオフに切り換えます。これは大域フラグなので、必要に応じて明示的にオフにしなければなりません。「旧スイッチ」と「新スイッチ」に同一の値を持たない変数を与えてreport_read_error/2を呼び出すことで、エラ−リポ−トがオンかオフのどちらであるかを調べられます。
?- report_read_error(off),read(T),!; read_error(P,C).
test[a,b].
T = _297
P = 2
C = 7
yes
?- syntax_error(7,M).
M = 'operator expected'
yes
?- _
|
| read on...
|
|
|
|