Translate

Saturday, 1 February 2014

High Level Languages

As stated before in previous blog a High Level language is one which offers a level of abstraction above assembly. Programs are written using sentence like statements to carry out sets of instructions.The code is independent of the computer architecture so one code does the same thing on any computer.

Here is an example of a COBOL Hello World program.
e.g.
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID.     HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400     DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500     DISPLAY "Hello world!" LINE 15 POSITION 10.
100600     STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800     EXIT.

High Level languages are easier to read, write and maintain. The languages must be compiled or interpreted to machine code so the instructions can be executed.

Compiled v.s. Interpreted Languages
Compiled Languages are transformed into machine code before running.
Interpreted Languages are read and executed at the same time.

Of course there are some languages that can be both depending on the way it is interpreted.

There are several High Level Languages out there such as C, C++, Java, Visual Basic, Python and much more.

High level


No comments:

Post a Comment