# Precondition

> In programming, a precondition is a set of conditions that must hold for a particular section of code (usually a function) to execute correctly.

In <programming>, a precondition is a set of conditions that must hold for a particular section of code (usually a function) to execute correctly.

## See also

- <Postcondition>
- <Invariant>
- <Design by contract>: A design approach that makes the semantics of preconditions, postconditions, and invariants concrete through the concept of a "contract."
- [Guard clauses](https://wiki.g15e.com/en/pages/Guard%20clauses.txt): Explicitly checking preconditions at the start of a function.