There are two ways to write error free programs. One of the first things you will discover in writing programs is that a program rarely runs correctly the first time. In fact, errors are so common in programming that they have their own special name: Bugs. Any program cannot be absolutely correct. There might be some mistake. The process of correcting, or getting off, bugs is called debugging.
Mainly, there are four types of errors exists in a program:
1. Syntax Error
These errors are the easiest to find because they are highlighted by the compiler. Error messages are given. This type of error is caused by the failure of the programmer to use the correct grammatical rules of the language. Syntax errors are detected, and displayed, by the compiler as it attempts to translate your program, i.e. the source code into the object code. If a program has a syntax error it cannot be translated, and the program will not be executed. The compiler tries to highlight syntax errors where there seems to be a problem, however, it is not perfect, and sometimes the compiler will indicate the next line of code as having the problem rather than the line of code where the problem actually exists.
2. Semantic Error
It is also called logical error. These are the hardest errors to find, as they do not halt the program. They arise from faulty thinking on behalf of the programmer. They can be very troublesome. These are mistakes in a program's logic. Programs with logic errors can compile, execute, and output results. Error messages will generally not appear if a logic error occurs, this makes logic errors very difficult to locate and correct. A compiler does not detect the logical error, therefore they are difficult to find out. When it gives wrong output, then we find it logical error has occurred.
3. Run time error
Run time errors are detected by the computer and displayed during execution of a program. They will halt the program when they occur, but they often do not show up for some time. Any time run time error might be occurred, so programmer has to handle this type of error by taking suitable action.
4. Arithmetic Error
It is the error caused by inappropriate arithmetic used. For Example
Dividing a number by zero
Subscript out of range
Taking the square root of a negative number
3. Unicode
Unicode is a universal character-encoding standard used for representing of text for computer processing. It is an encoding system that "provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language",
Unicode uses 16 bits, which means that it can represent more than 65,000 unique characters. This is a bit of overkill for English and Western-European languages, but it is necessary for some other languages, such as Greek, Chinese and Japanese. Many analysts be live that as the software industry becomes increasingly global, Unicode will eventually supplant ASCII as the standard character coding format. Unicode is an entirely new idea in setting up binary codes for text or script characters. Officially called the Unicode Worldwide Character Standard, it is a system for 'the interchange, processing, and display of the written texts of the diverse languages of the modern world.
You must be logged in to post a comment.