Conditional
In a conditional statement or expression the value of a condition determines which alternative pieces of code to execute.
Related concepts: StatementExpressionControl Flow
Closest Wikipedia entry: Conditional (computer programming)
Misconceptions about Conditional23 documented Misconceptions
Check YourselfBaseCaseNotNeeded
Recursive computations do not necessarily need a base caseConditionOneOutEdge
A condition node in a control-flow graph can have a single outgoing edgeConditionalIsSequence
If-else is equivalent to sequence of two ifsElsIf
There is an elsif keyword for multi-way conditional statementsElseAlwaysExecutes
The else branch of an if-else statement always executesForIsConditional
The body of a for statement executes at most onceIfIsLoop
The body of an if statement executes repeatedly, as long as the condition holdsIfRequiresElse
Every if statement requires an elseLoopTerminatingCondition
For and while loops end when the condition becomes trueMapToBooleanWithConditionalOperator
To map a boolean expression to a boolean, a conditional operator is necessaryMapToBooleanWithIf
To map a boolean expression to a boolean, an if statement is necessaryRecursiveMethodNeedsIfElse
A recursive method needs to contain an if-else statementStatementMultipleOutEdges
A non-condition node in a control-flow graph can have multiple outgoing edges