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.
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: Explicitly checking preconditions at the start of a function.