Syntax Errors • • • •
Statements that don’t conform to language rules Usually typing or naming errors The author should not be the only person to desk check the program- self fulfilling prophecy Some languages, especially earlier ones, had no help with syntax errors, or help such as “Error 53” Later generation programs like VB have integrated syntax error correction and detection
Problem Object Names
Error Message
Fixed by
Punctuation Typos Incomplete Statements (If with no Then) Not ending statements Using reserved words as Identifiers
Run Time Errors Aka execution errors Problems that occur when you run the program (ie, run time) that are not logic errors, but are generally because of limitations of the programming language or the fact that you are running it on a computer Calculation which there is no result Result of operation outside range allowed Real numbers: Inability of computer to exactly store results of some decimals Comparisons may be wrong if number is slightly different
Variable errors
Divide by zero With integer variables -37,768 + 32,760 =??? BEGIN Input Number Answer=Number/999,999,999 Number = Answer * 999,999,999 If Number = Answer Then Print Equal Else Print Not Equal EndIf END