Pascal Now

Pascal If-Else Statement

Site Logo

The if-else statement provides a selection control structure to execute a section of code if and only if an explicit run-time condition is met.  The condition is an expression which evaluates to a boolean value, that is, either true or false.

Selection statements are also referred to as conditional statements.  Other Pascal selection statements are the if statement and the case statement.

Syntax

 

<if-else-statement> ::= if <expression> then <statement> else <statement>

Semantics

Flowchart

Remarks

Examples

See Also

Pascal Now Home  Pascal Now Home
Syntax Index  Syntax Index
E-Mail
Valid HTML 4.01 Transitional Valid CSS!

copyright 2005, j.h.young, revised 9/15/05