ifthen
An if-then statement is a control-flow construct that evaluates a boolean condition and executes a block of statements when the condition is true. It is a basic mechanism for conditional execution and appears in many programming languages as well as in formal logic. If the condition is false, the program continues with the next statement, or follows an alternative path if an else branch is provided.
Origins and usage: Historically, forms of conditional branching appeared in early imperative languages such as Algol
Variants: most languages support an optional else-part to specify an alternate block when the condition is
Impact: The if-then construct is central to algorithm design, enabling branches, guards, and early exit patterns.