biology daily - the biology and biochemistry encyclopedia
biology daily articles and research Encyclopedia Dictionary Forums biology research links Weblinks Pictures Articles Blogs Newsletter

Precondition

In logic a precondition is a condition that has to be met, before a main argument can have any value.

In computer programming, a precondition is a fact that must always be true just prior to the execution of some section of code. Preconditions are sometimes tested using assertions within the code itself. Often, preconditions are simply included in the documentation of the affected section of code. If a precondition is violated, the effect of the section of code becomes undefined and thus may or may not carry out its intended work. Security problems can arise due to incorrect preconditions - e.g. a section of code that has the precondition that the input is correct, when it may not be.


See also



07-14-2008 23:18:10
The contents of this article are licensed from Wikipedia.org under the GNU Free Documentation License. How to see transparent copy
BiologyDaily.com 2005. Legal info   Privacy