Intermec Janus 2020 Reference Manual - Im_Isgood
im_isgood
3-70
im_isgood
Purpose:
This macro determines if the return status code from another PSK function
is a success.
Syntax:
With System, Text_IO, Intrmecd_IO, Intrmecp_IO;
Use System, Text_IO, Intrmecd_IO, Intrmecp_IO;
function im_isgood(
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 a warning or an error (either fatal or nonfatal)
nonzero
Indicates success
See Also:
“Status Code Macros” in Chapter 2, “Working With Ada,”
im_iserror, im_issuccess, im_iswarn
Example
With System, Text_IO, Intrmecd_IO, Intrmecp_IO;
Use System, Text_IO, Intrmecd_IO, Intrmecp_IO;
procedure ex_isgood is
status : System.Word;
begin
status := im_sound(IM_LOW_PITCH, IM_BEEP_DURATION, IM_NORMAL_VOLUME);
if im_isgood(status) then
Put_Line('Beep successful!');
else
Put_Line('Beep error or warning');
end if;
New_Line;
end ex_isgood;