$eject
/*************************************************************
*         MODULE NAME: TEXT03.SIM                            *
*         PUBLIC PROCEDURE: ERROR$COMMAND                    *
*************************************************************/

error$msg: do;
  declare cr literally '0dh', lf literally '0ah';
  declare error$flag byte external;
  declare linenumber address public initial (0);
  declare ernum address public initial (0);
  printmsg: procedure(a) external;
  declare a address; end printmsg;
  printline: procedure(numb) external;
  declare numb address; end printline;

/*************************************************************
*                                                            *
*     ERROR$COMMAND - GIVES THE MESSAGE AND LINE NUMBER      *
*                     IF ERROR DETECTED IN COMMAND LINE      *
*                                                            *
*************************************************************/

 error$command: procedure public;
  errorflag = 0;        /* reset errorflag */
  call printmsg(.('ERROR COMMAND DETECTED ON LINE: $'));
  call printline(linenumber);
  call printmsg(.(cr,lf,'$'));
  ernum = ernum + 1;
  end error$command;
end error$msg;

eof
