The if-else
and if-elsif-else
statements use
TRUE
and FALSE
conditions to execute
statements.
- If the expression evaluates to
TRUE
, the if branch is executed. - If the expression evaluates to
FALSE
,x
, orz
, the else branch is executed.- A block of multiple statements is executed in an
if
orelse
branch. -
begin
andend
keywords are required. -
if-else
statements can be nested.
- A block of multiple statements is executed in an