UNIT 18 PROCEDURAL PROGRAMMING

 

 

Procedural programming, or Imperative Programming, is the term used in the creation of a computer program. This method of developing software, application, is to be as concise as possible, following an accurate linear process. Leading to a completed programme with  a specific outcome. A program written with certain procedural steps in order to reach a specific is a procedural program. Procedural programs contain at least one procedure.

Programmers often start with a logical procedure written in plain language. This then is converted into whichever computer language is desired. Following functions and routines and subroutines to get the desired result.

The basis for this logical exercise is to be able to plan any procedure in order to achieve a desired result no matter who uses it. For example the ability to run could not be achieved before the abilities to both stand and walk. Setting a procedure in an incorrect sequence would literally in this case end up with you falling over, as it could also on the ethereal level of a program. Seeing procedural programming as a step by step process is the key.

In larger programs this method can be problematic. The more steps required in its overall process can complicate the overall process exponentially. Requiring each step to be specifically correct in context, to both itself and the overall programme, can be confusing to create and maintain as the programme becomes larger. Not to mention the location of any errant or incorrect steps. In cases such as these the program could be more easily written with Object Oriented Programming (OOP), which focuses more on the data being used rather than the steps in a program.

Some large programmes written in procedural programming format are: The Linux kernel, which is the core of an open-source operating system; major applications such as the Apache server, the Drupal content management system and Samba, are all written in this manner. Though these are widely considered to be complex by the programming industry.

Some Procedural programming languages available are BASIC, C/C++,  Java, ColdFusion, PASCAL,  Fortran, and Python, with C being the most popular. Many important applications and utilities have been written using these languages. For example Anaconda, the installer for Fedora Linux, is written in Python, as are various software managements tools.

A disadvantage to procedural programming is its running speed, due to its high amount of information compared to code written in a lower level language. Another is its inability to run a program with a large number of variable outcomes. One more is the variety of different languages, each with its own suitability for applications, making it difficult to know each language fluently.

As an example we will look at BASIC:

BASIC (Beginners All-purpose Symbolic Instruction Code) is a collection of general purpose, high level programming languages. They were designed as an easy to use program for anybody. They were created by John G Kemeny and Thomas E Kurtz in 1964 at Dartmouth College, New Hampshire, U.S.

Prior to this programming was only required to be learnt by science and mathematic students and seniors. Once BASIC had been created it allowed other students to program where they had had to seek a programmer before.

Soon BASIC had become widespread. Taking off in the mid 1970’s and 1980’s. Allowing small business users, hobbyists, professionals, and consultants to develop their own, much cheaper, custom software.

Being a multi-platform language there are many basic programmers that all use the same types of routines. These are:
Loops
Input from keyboard
System commands
Specific task immediately
Structured programming
Subroutines
Built in functions
User defined functions
Arrays, sorting, and searches
A simple example of a BASIC program is:

10 PRINT “Hello”
20 GOTO 10

This would print the word ‘Hello’ infinitely on the computer screen. The exponential value leading out from this point is endless, allowing BASIC to be used in the creation of any program tailored to any specific need.

 

 

 

https://en.wikipedia.org/wiki/BASIC_Programming
http://www.wisegeek.org/what-is-procedural-programming.htm
https://uk.answers.yahoo.com/question/index?qid=20101214090340AAOdFdS
https://www.techopedia.com/definition/8982/procedural-language
https://www.reference.com/technology/disadvantages-procedural-programming-eccac5f2db0faebd