dev_error_var — 定义或取消定义错误变量。
dev_error_var defines an error variable, i.e., a variable which
contains the result state of the last operator call.
ErrorVar will be 2 (
H_MSG_TRUE)
if no error had occurred.
The parameter Mode specifies whether the error variable should be
used (1) or not (0).
If an error variable is active it will be updated each time an operator
execution is finished. Thus a value is only valid until the next
call of an operator. The value can be saved by assigning it to
another variable (see example)
or by calling dev_error_var(ErrorVar,0).
ErrorVar (输入控制) integer → (integer)
Name of the variable which shall contain the error status.
默认值: 'ErrorVar'
Mode (输入控制) integer → (integer)
Switch the error variable on or off.
默认值: 1
值列表: 0, 1
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
dev_error_var (Error, 1)
dev_set_check ('~give_error')
FileName := 'wrong_name'
read_image (Image, FileName)
ReadError := Error
if (ReadError != H_MSG_TRUE)
write_string (WindowHandle, 'wrong file name: '+FileName)
endif
If the values of the specified parameters are correct,
dev_error_var 返回 2 ( H_MSG_TRUE )。否则,将抛出一个异常并返回错误代码。
dev_set_check,
if,
elseif,
else,
assign
基础