Download INTRODUCTION TO COMPUTERS
Transcript
12. Explain the following types of computer program errors: a) Syntax error (2mks) These are programming errors/mistakes that occur due to incorrect/improper use of the grammatical rules of a particular language E.g., Punctuation mistakes, (i.e. omitting a comma or a semicolon), improper naming of variables, wrong spellings of user defined and reserved words. b) Logical Errors These are errors that occur as a result of bad program design Logical errors relate to the logic of processing followed in the program to get the desired results e.g. they may occur as a result of misuse of logical operators. c) Run-time (execution) error. (2mks) Run-time (execution) errors. They occur when the programmer develops statements, which are not projecting towards the desired goal. Such statements will create deviations from the desired objectives 13. Explain four error detecting methods in program development (4mks) i) Dry running (desk checking); - checking a program for errors by making the corrections on a paper before entering it in the program editor. ii) Translator system checking: - It involves the running of a translator program (e.g., compiler or Interpreter) after entering the set of coded instructions in order to detect any syntax errors.