Please note! This essay has been submitted by a student.
Procedures are a set of instructions that are ordered into a number of steps. This will allow programs to follow the needs of the developer. In python before using your procedure, you will need to give it a name. Procedures are just small sections of the code in programs, these can also be called sub-programs. A procedure will help the programmer to stop repeating the same line of code. Procedures will use their own set of variables; these variables will not be used within the main program.
In a way Functions can be the same as procedures but instead they will return with only using values. They can also be separated from the main area of the code.
Functions are the same as procedures, but they are returned using values. They can also use parameters; can be separated from the main area of the code.
Pre-defined functions are functions that are already built within the program. The function is not in any class therefor it is a standalone function. A pre-defined function is set instructions that are already created within the program. One example of a programming language that uses pre-defined functions is Java.
One pre-defined function that Java uses in username = username.toLowerCase – This line of code will tell the program to make the all characters that are stored in the variable username will be lowercase. Another predefined function in Java would be username = username.toUpperCase – this line of code will tell the program to change all the characters that are stored in the variable username to be changed into uppercase.
A local variable is from certain areas of the code. This can prevent other users editing the variable from outside of the section of code.
Local variables can also be used from a certain area of the code, this will mean that they will not be used in other sections of the program or code.
The global variables are defined out from a function and this allow them to be used anywhere within the area of code.
Global variables are like local variables but instead global variables can be used from anywhere within the code. This can become useful for the variables that are the same and used throughout the code.
A parameter passing lets the values of a variable to be passed through the program, which will handle with a procedure.
Programming libraries are a collection of classes, values, subroutines and they come ready built into programs. The programming libraries can be used whenever the developer wishes to. Many different libraries are used in programs however; they will all serve different functions. Many programs will use libraries in programming and each will be unique to their own program. The line of codes that are used will different to other programs.