Source: wikibot/precondition

= Precondition
{wiki=Precondition}

A precondition is a condition or requirement that must be satisfied or fulfilled before a certain action or function can be executed or a particular scenario can take place. In programming and software development, preconditions are often used to specify the necessary state of the system or inputs required for a function or method to perform correctly. For example, in a function that calculates the square root of a number, a precondition might be that the input number must be non-negative.