Please enable JavaScript.
Coggle requires JavaScript to display documents.
Errors (Logic errors (Common logic errors (•Instructions written and(…
Errors
Logic errors
•The syntax of the code is correct
•The code doesn't do what it should
•Will usually run normally but with some unexpected results
•May sometimes cause a run time error
Common logic errors
•Instructions written and( therefore executed) in the wrong order
•Misplaced brackets
•Incorrect mathematical formulae
•Incorrect conditions provided for loops/selection statements
Syntax errors
•Code does not follow the rules of the programing language
•Usually detected during development
Program will not be compiled
Common syntax errors
•Using variable without declaring them
Incorrect spelling of variable names
•Passing incorrect/insufficient parameters
•Missing parts of multiline statements
Data type mismatch
•Missing/Extra brackets.
Run-time errors
•program attempts impossible operation
•Causes program to crash at run time
•Usually detected while testing
Common run-time errors
•Division by zero
•Attempt to access no existent files
•Attempt to access array elements before they are intiatialised
• Calculating √ of a negative number
•Overflow error - result of a calculation is a number that is too large