|
[NEXT] [PREV]
HANDBOOK
/ GENTLE PRIMER
/ Control Structures
/The Conditional Statement |
|
Gentle
Applications Concepts Examples Handbook Support Download
|
A frequent case is that, if a certain condition holds, a specific action
should be initiated, otherwise nothing should happen.
This could be expressed by an alternative statement
with an empty second alternative.
For example, (| IsBad(Item) Complain(Item) || /*nothing*/ |)This can be abbreviated by a conditional statement. [| IsBad(Item) Complain(Item) |]An alternative statement has the form
A conditional statement cannot define variables because if one member fails its conceptual empty second case is taken which defines no variables. |