Saturday 22 November 2014

Key Features of Procedural Programs


Pre-defined functions
Pre defined functions are set of subroutines that perform mathematical calculations when called upon and are either included in a program at compilation time or called when a program is executed.

Local variables
A local variable is a variable that is only accessible in a certain part of the program, such as a single function.

Global variables
Global variable are the opposite to local variables. These variables can be used throughout the whole program.

Parameter passing
Parameter Passing allows the value of the variables to be passed through the program to the procedure

Modularity
Modularity is the method of splitting your code into separate pieces, or modules, instead of it being all together. This is done for a few reasons, the first being that it makes the code much easier to read. It also makes the code easier to debug as the problem will be found much faster.

Procedures
A procedure is a set of commands that are executed in a certain order. This is often confused with Functions as they are really similar, the main difference being however is that functions return a value whereas Procedures do not.

Programming libraries
These are a collection of pre built source codes, sub routines, classes etc. That are stored in the program and can be used by the program or user at any time. An example of this is the Scanner Library in Java.


No comments:

Post a Comment