Program QIOERR;
{$nomain}

{ 
  Version
  File:[22,310]QIOERR.PAS
  Author: Jim Bostwick 2-Nov-83

  Last Edit: 23-JUN-1988 22:20:46 

  History:
	 23-JUN-1988 21:57:51  - JMB PA3UTL upgrade.

}
{$Nolist}
{[a+,b+,l-,k+,r+] Pasmat }
 %INCLUDE 'PAS$EXT:General.typ';
%INCLUDE 'PAS$EXT:SAYERR.EXT';  { error text procedure }
{$List }

Function QIOERR(str:packed array [lo..hi:integer] of char;
  		code:integer):Boolean;External;

{*USER*
 If code < 0, returns TRUE and prints error message on Input.
If code >=0, returns FALSE, and does nothing else.
}

Function QIOERR;

VAR
  i,top:Integer;

BEGIN
  if code >= 0 then QIOERR := False
  else
    BEGIN 
    QIOERR := true;
    Write('I/O error at ');
    if lo = 0 then top := ord(str[0]) else top := hi;
    for i := 1 to top do Write(str[i]);
    writeln;
    sayerr(code)
    END
end;


