Please enable JavaScript.
Coggle requires JavaScript to display documents.
3 Types of Errors (Logic (Common Logic Errors (Misplaced brackets,…
3 Types of Errors
Syntax
Usually detected during development
Program will not be compiled
Code doesn't follow the rules of the language
Common Syntax Errors
Incorrect spelling of variable name
Passing incorrect / insufficient parameters
Using variables without declaring them
Missing parts of multiline statements
Data Type mismatch
Missing / extra brackets
Logic
Code doesn't do what it should :
Will usually run normally but with some unexpected results
Syntax is correct
Usually detected while testing
May sometimes cause a run-time error
Common Logic Errors
Misplaced brackets
Instructions written (and therefore executed) in the wrong order
Incorrect mathematical formulae
Incorrect conditions provided for Loops / selection statements
Run-Time
Causes program to crash at run-time
Usually detected while testing
Programs attempts impossible operation
Common Run-time Errors
Attempt to reference array elements before they are initialized
Calculating √ of a negative number
Attempts to access non-existent file
Overflow error - result of calculation is a number that is too large
Division by zero