Contents    Page-10    Prev    Next    Page+10    Index   

Error Messages

The compiler writer has a serious obligation: the compiler must produce either correct output code or an error message.

Good error messages can save a great deal of programmer time; this makes it worth the trouble to produce them.

  1. The message should be written out as text.

  2. A pointer to the point of the error in the input program should be provided when appropriate.

  3. Values from the program should be included in the message where appropriate.

  4. Diagnostic messages ( e.g., unused variables) should be included, but user should be able to turn them off.

        X[CVAR] := 3.14
        

*ERROR*  CVAR, of type COMPLEX,
         may not be used as a subscript.