Intermec Janus 2020 Reference Manual - Im_Iserror
im_iserror
3-69
3
im_iserror
Purpose:
This macro determines if the return status code from another PSK function
is an error (either fatal or nonfatal).
Syntax:
With System, Text_IO, Intrmecd_IO, Intrmecp_IO;
Use System, Text_IO, Intrmecd_IO, Intrmecp_IO;
function im_iserror(
status :System.Word
) return Boolean;
IN Parameters:
The status parameter is any PSK function that returns a status code.
OUT Parameters:
None.
Return Value:
0
Indicates success or warning
nonzero
Indicates an error (either fatal or nonfatal)
See Also:
“Status Code Macros” in Chapter 2, “Working With Ada,”
im_isgood, im_issuccess, im_iswarn
Example
With System, Text_IO, Intrmecd_IO, Intrmecp_IO;
Use System, Text_IO, Intrmecd_IO, Intrmecp_IO;
procedure ex_iserror is
status : System.Word;
begin
status := im_sound(IM_LOW_PITCH, IM_BEEP_DURATION, IM_NORMAL_VOLUME);
if im_iserror(status) then
Put_Line('Beep Error!');
else
Put_Line('Beep success or warning');
end if;
New_Line;
end ex_iserror;