4D v13.4If...Else...End if |
||
|
4D v13.4
If...Else...End if
If...Else...End if
The formal syntax of the If...Else...End if control flow structure is: If(Boolean_Expression) Note that the Else part is optional; you can write: If(Boolean_Expression) The If...Else...End if structure lets your method choose between two actions, depending on whether a test (a Boolean expression) is TRUE or FALSE. When the Boolean expression is TRUE, the statements immediately following the test are executed. If the Boolean expression is FALSE, the statements following the Else statement are executed. The Else statement is optional; if you omit Else, execution continues with the first statement (if any) following the End if. ` Ask the user to enter the name Tip: Branching can be performed without statements to be executed in one case or the other. When developing an algorithm or a specialized application, nothing prevents you from writing: If(Boolean_Expression) or: If(Boolean_Expression) |
PROPERTIES
Product: 4D SEE ALSO
Case of...Else...End case |