High-level language program


High level language is the next development in the evolution of computer languages. Examples of some high-level languages are given below

  • PROLOG (for “PROgramming LOGic”)
  • FORTRAN (for ‘FORrmula TRANslation’)
  • LISP (for “LISt Processing”)
  • Pascal (named after the French scientist Blaise Pascal).

High-level languages are like English-like language, with less words also known as keywords and fewer ambiguities. Each high level language will have its own syntax and keywords. The meaning of the word syntax is grammar.

Now let us discuss about the disadvantages of high-level languages

  • A high level language program can’t get executed directly. It requires some translator to get it translated to machine language. There are two types of translators for high level language programs. They are interpreter and compiler. In case of interpreter, prior execution, each and every line will get translated and then executed. In case of compiler, the whole program will get translated as a whole and will create an executable file. And after that, as when required, the executable code will get executed. These translator programs, specially compilers, are huge one and so are quite expensive.

  • The machine language code generated by the compiler might not be as compact as written straightaway in low-level language. Thus a program written in high-level language usually takes longer time to execute.

Now we shall discuss about the advantages of high-level languages

  • High-level language programs are easy to get developed. While coding if we do some errors then we can easily locate those errors and if we miss then during compilation those errors would get detected by the compiler. And the programmer will initiate respective corrections to do needful accordingly.

  • By a glance through the program it is easy to visualize the function of the program.

  • The programmer may not remain aware about the architecture of the hardware. So people with our hardware knowledge can also do high level language programming.

  • The same high level language program works on any other computer, provided the respective compiler is available for the target new architecture. So high-level languages are portable.

  • Productivity against high level language programming is enormously increased.

To conclude, high-level languages are almost always used nowadays except where very high-speed execution is required.

Example

As an example, let us consider the following program code written in high-level language C

#include <stdio.h>
int main() {
   int a,b,c;
   printf("

\t\t Welcome to the world of programming...");    printf("

\t\t Please enter the first number...");    scanf("%d",&a);    printf("

\t\t Please enter the second number...");    scanf("%d",&b);    c = a+b;    printf("

\t\t So the sum of %d and %d is %d...",a,b,c);    printf("

\t\t End of the program..."); }

Updated on: 27-Jun-2020

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements