Procedural languages are the third-generation languages. They are also called high-level languages because they represent a higher level of abstraction from machine code than do assembly languages. Procedural languages employ more human-like words, and each has its own set of syntax rules. They are also more efficient, allowing the programmer to express with one statement what would take several commands in machine language. They are called procedural languages because they allow the programmer to create procedures that implement structured programming. Procedural languages are by far the most widely used programming languages.
The development of procedural languages was started by the invention of translation programs that could convert the syntax of the high-level language to machine code that the computer could execute. These translators are compilers and interpreters. A compiler converts an entire program written in a high-level language to machine language, storing it in what is called executable file, to be run later at the user's discretion. The original code is then called the source code, and the machine-language code is called the object code.
An interpreter reads each high-level program statement, then translates it to machine language and instructs the computer to execute the statement immediately. It creates no object code and no executable file; from the programmer's or user's standpoint, the computer executes the original code. This method of execution gives the programmer more immediate control of the machine and lends itself to an interactive method of programming and refining code and testing it immediately. The interpreter program does not permanently change the code, allowing users or programmers to make additions and other modifications to the program more easily. However, interpreting the code takes more processing than running a compiled program, so interpreted programs generally run slower than compiled programs.
Some of the most frequently used procedural languages include the following: BASIC, PASCAL.
Date: 2015-01-02; view: 1223