0% found this document useful (0 votes)
35 views4 pages

CMP 201 CLASS 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

CMP 201 CLASS 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

PROCEDURAL AND NON-PROCEDURAL LANGUAGES

PROCEDURAL LANGUAGE
The procedural code is the one that directly instructs a device
on how to finish a task in logical steps. This paradigm uses a
linear top-down approach and treats data and procedures as
two different entities.
Procedural Programming divides the program into procedures,
which are also known as routines or functions simply containing
a series of steps to be carried out.
Procedural Programming involves writing down a list of
instructions to tell the computer what it should do step-by-step
to finish the task at hand.

Examples of procedural language are:


 BASIC (Beginner’s All-Purpose Symbolic Instruction Code)
 COBOL (Common Business Oriented Language)
 PASCAL
 FORTRAN (Formula Translator)
 C
 LISP
 ALGOL
Advantages
1. Procedural Programming is excellent for general-purpose
programming
2. The source code is portable and can be used to target
different CPU as well
3. The code can be reused in different parts of the program,
without the need to copy it.
4. Through Procedural Programming technique, the memory
requirement also slashes
5. The program flow can be tracked easily.

Disadvantages
1. The program code is harder to write when Procedural
Programming is employed.
2. Difficult to relate with real-world objects.
3. The importance is given to the operation rather than the
data, which might pose issues in some data-sensitive
cases
4. The data is exposed to the whole program, making it not
so much security friendly.

NON-PROCEDURAL LANGUAGES
These programming languages are considered as object-
oriented programming languages. They are event-driven which
means that a programmer selects an event that needs to occur
before the instruction or statement is executed. Examples of
events are click, double click, drag and drop, mouse over and
other events.
Examples of non-procedural languages are:
 VISUAL BASIC
 C++
 JAVA
 DELPHI
 PROLOG
 SQL
 RGP (REPORT PROGRAM GENERATOR)
 LISP

Advantages
1. NON-procedural languages offer ease of management.
2. NON-procedural languages mimic the real world, making it
easier to understand.
3. Objects are reusable in other programs.

Disadvantages
1. NON-procedural languages tend to be slower and use up a
high amount of memory.
2. Over-generalization
3. Programs built using NON-procedural languages may take
longer to be created.
Procedural
NON-procedural Programming
Programming
Uses immutable data Uses mutable data
Follows the
Follows the imperative programming
declarative
model
programming model
Extends support to
Not suitable for parallel programming
parallel programming
The execution order of
The execution order of statements is
statements is not the
very important
primary focus
Flow control is
performed using Flow control is performed through
function calls & conditional statements and loops
Iterative loops

You might also like