Page 15 - iPro_trackGPT_V5_Class6
P. 15
Natural languages are easy to use. For example, in a 4GL (Fourth-Generation Language), a
program to get the names of students with marks over 95 might be written as:
SELECT LAST-NAME, FIRST-NAME FROM STUDENT WHERE MARKS > 95.
A natural language version of the same program might be written as:
TELL ME THE NAME OF STUDENTS WITH MARKS OVER 95.
Natural languages are often linked to expert systems and artificial intelligence. They are
popular in medical and scientific fields but are not widely used in business applications.
Advantages of High-Level Languages:
Here are some key advantages of using high-level languages:
It is user-friendly.
It is similar to the English language, which makes it easier to use.
It requires less time to write a program.
It is easier to maintain.
It is problem-oriented rather than machine-based.
It is machine-independent, i.e. programs can run on any computer.
Disadvantages of High-Level Languages:
Here are some notable disadvantages of high-level languages:
Programs written in high-level languages require more memory and system resources.
It offers limited control over hardware, making it harder to optimise performance.
LANGUAGE TRANSLATOR
A language translator is software that converts a high-level language program into a machine
language. There are mainly three types of language translators:
Assembler
An assembler is a program that translates assembly language into machine language so that the
computer can understand it.
Compiler
A compiler is a program that converts code from a high-level language into machine language
so that the computer can run it. It processes the whole program at once and creates an
executable file.
Interpreter
An interpreter is a program that translates and executes code written in a high-level language
line by line to machine language. It directly runs the code, making it easier to test and debug,
but it may run slower than compiled code. It reads a code statement, converts it to machine
language instructions, and executes them immediately. Errors are displayed one line at a time,
and the interpreter moves to the next line only after the error is corrected.
Categories of Computers and Computer Languages 13

