High Level/Procedure Oriented Language:
We have already seen that writing of program in machine language or assembly language requires a deep knowledge of internal structure of the computer. While writing programs in any of these languages, a program has to remember all the operation codes of the computer and know in detail what each code does and how it affects the memory of the computer. However, we have also seen that in order to write a good computer program, the programmer should mainly concentrate on the logic of the problem rather than be concerned with the detail of the internal structure of the computer. In order to facilitate the programmers to use computers without the need to know in detail the internal structure of the computer high-level languages were developed.
Unlike the machine language or assembly language, the high level languages are producer oriented and machine independent because they relate to procedure being coded. Therefore, program written in high level language can be executed on a computer system that has translator available for that programming language. English like statements and no machine system are involved. High level language is used for writing a program were each statement is fairly a simple command to carry out some action.
For example, let us consider the same problem of adding two numbers (FRST & SCND) and storing the sun in ANSR.
| FRST |
= |
0 |
| SCND |
= |
0 |
| ANSR |
= |
0 |
| INPUT "INTER TWO VALUES" FRST, SCND |
|
|
| ANSR |
= |
FRST+SCND |
| PRINT ANSR |
|
|
| END |
|
|
The instruction is obviously very easy to understand and write because it resembles the familiar algebraic for adding two numbers: c = a + b.
Advantages of High Level Language:
High level language posses the following advantages over assembly language:
- Machine Independence
High-level languages are independent. This is very valuable advantage because it means that a company changing computers will not be require to rewrite all the programs that it is currently using.
- Easy to Learn and Use: (User Friendliness)
These languages are very similar to the languages normally used by us in our day-to-day life. Hence they are easy to learn and use. The programmers need not learn anything about the computer he is going to use. He need not worry about how to store his numbers in the computer, were to store them, what to do with them, etc. That is the programmer need not know the machine instructions, the data format, and so on.
- Fewer Error
In case of high level languages, since the programmer needs not write all the small steps carried out by the computer, he is much less likely to make an error. The computer takes care of all the little details, and will not introduce any error of its own unless something breaks down. Furthermore, compilers are so designed that they automatically catch and point out the errors made by the programmer. Hence, diagnostic errors, if any, can be easily located and corrected by the programmer.
- Lower Program Preparation Cost
Writing program in high level languages requires less time and effort which ultimately leads to lower program preparation cost. Generally, the cost of all phases of program preparation (coding, debugging, testing, etc.) is lower with a high level language than with an assembly language or with a machine language.
- Now Worry About Addresses
one of the greatest advantage of the high level language is that is eliminates worry about address for instructions and data. This is more important than it seems at first glance.
- Better Documentation
A high level language is designed in such a way that its instructions may be written more like the language of the problem. Thus, the statements of a program written in a high-level language can be easily understood by a person familiar with the problem. For the documentation of such programs, very few or practically no separate comment statements are required.
- Easier to maintain
Programs written in high level language are easier to maintain than assembly language or machine language programs. This is mainly because they are easier to understand and hence it is easier to locate, correct, and modifies instructions as and when desired. Insertion or removal of certain instructions from a program is also possible without any complication. Thus, major changes can be incorporated with very little effort.
Limitations of High Level Languages:
- Lack of Flexibility
because the automatic features of high level languages they are not under the control of the programmer, they are less flexible than assembly/machine language. An assembly languages provides programmers access to all the special features of the machine they are using. Certain types of operations which are easily programmed using the machine language are impractical to attempt using a high level language. This lack of flexibility means that some tasks cannot be done in a high-level language or can be done only with great difficulty.
- Needs of Translator: (Interpreters/Compilers)
We discussed earlier that computer can only understand the language of 0, 1. While English like statements are used in high level language which are not understandable by the computer. To concert high level langu8age instructions into computer readable form a translator is used. The types of translators which converts high level language into machine language are called interpreter and compilers.
|