Introduction To Programming/Subprograms

It is an unfortunate fact of life that things break--and computer programs are certainly no exception. One of the things that engineers have learned is that, in general, complex things break more often than simple things. Unfortunately, even a well built program can be tremendously complicated. Something like Microsoft Windows XP is probably more complicated than the Space Shuttle. It isn't surprising then, that software has bugs.

In many disciplines, including mathematics, it is a common to solve big, complicated problems by breaking them down into a group of smaller, simpler problems. That is the basic principle behind subprograms. Rather than write one big, complicated program that solves the entire problem, we can write several small pieces of a program that each solve part of the problem and, then, combine them together, in some specific way, to solve the entire problem.

Subprograms go by different names--depending on the programming language being used.

Note: the difference between a procedure (or subroutine) and a function is that functions return a result, whereas procedures do not. In some languages, such as C# this distinction is implicit. In others, such as Pascal, it is explicit.


  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.


Introduction_to_Programming/Subprograms
 

Manage research, learning and skills at IT1me. Create an account using LinkedIn to manage and organize your IT knowledge. IT1me works like a shopping cart for information -- helping you to save, discuss and share.


  Contact Us  |  About IT1me.com |  IT Training & References |  IT Careers |  IT Hardware |  IT Software |  IT Books