Learning a New Programming Language Part 2: Language Types - Procedural Languages
(Page 3 of 4 )
Procedural languages are pretty simple to understand. They follow a "do this then do that" top to bottom sort of flow. As mentioned above, there are quite a few procedural languages that have had OO features tacked on. These languages can still be written in a purely procedural manner, however.
Procedural languages use functions (sometimes called subroutines) that accept arguments and return values just like methods in OO languages, however they stand on their own in the code along with other code that lives outside any function.
C is an example of a procedural language. Though OO languages are designed around code reuse, it is possible to reuse code in C or other procedural languages in the form of separate files called libraries. Code libraries contain functions that, when attached to a project using an "include" directive or other similar syntax, can be used to add functionality to the application.
This isn't as flexible or organized as using classes and objects, but it's better than writing these functions over and over for each project that needs them.
Examples of procedural languages are C, PHP, Perl, Fortran, Basic, Visual Basic, Assembly, Cobol and Powerbuilder.
More Web Hosting How-Tos Articles
More By Chris Root