[INHERIT('SCREENHANDLERS'), environment('utilityops')]

MODULE UTILITYOPS;

CONST
   blank = ' ';    
    


PROCEDURE gotoendofprogram;
EXTERN;

          

[GLOBAL] PROCEDURE errorexit( caller : varying[limit1] of char;
	                      message : varying[limit2] of char );
begin
   ttywriteln;
   ttywritestring('?ERROR from ');
   ttywritestring(caller);
   ttywritestring(message);
   ttywriteln;
   gotoendofprogram
end;

  


[GLOBAL] PROCEDURE warningmessage( caller : varying[limit1] of char;
	                           message : varying[limit2] of char );
      
begin
   ttywriteln;           
   ttywritestring('%WARNING from procedure ');
   ttywritestring(caller);                 
   ttywritestring('"');
   ttywritestring(message);
   ttywritestring('"');
   ttywriteln
end;




[GLOBAL] PROCEDURE nullstatement;
begin
end;




[GLOBAL] FUNCTION capchar ( ch : char ) : char;
begin
  if ch in ['a'..'z'] then
    capchar := chr(ord(ch) - 32)
  else
    capchar := ch
end;




[GLOBAL] FUNCTION lcchar( ch : char ) : char;
begin
  if ch in ['A'..'Z'] then
     lcchar := chr(ord(ch) + 32)
  else
     lcchar := ch
end;

                                     
END.
