errorerror() は, ユーザ函数の内部でこの
動作と同様の動作を行わせるための函数である.
error() が呼び出される際に表示されるメッセージで,
文字列である.
error()
を呼び出すようにしておけば, その時点で自動的にデバッグモードに入れる.
% cat mod3
def mod3(A) {
if ( type(A) >= 2 )
error("invalid argument");
else
return A % 3;
}
end$
% asir
[0] load("mod3");
1
[3] mod3(5);
2
[4] mod3(x);
invalid argument
stopped in mod3 at line 3 in file "./mod3"
3 error("invalid argument");
(debug) print A
A = x
(debug) quit
return to toplevel
[4]
debug.
Go to the first, previous, next, last section, table of contents.