[inherit('sys$library:starlet','lib$spawn','smgdefs','smg$repaint_line',
'BB.PEN')]
module write_error;

[global,asynchronous,unbound]
procedure write_error(error_line:string;error_condition:boolean:=true);

{Writes an error box above the menu box display.}

begin
  smg$erase_display(error_display);
  if error_condition then
    smg$put_chars(error_display,'Error encountered: ',1,1,1,smg$m_bold);
  smg$put_chars(error_display,error_line+chr(0));
  smg$paste_virtual_display(error_display,pasteboard,screen_rows-3,2);
end;

end.
