Chapter 16 The Single-Alternative Decision Structure
16.1 The Single-Alternative Decision Structure
This is the simplest decision control structure. It includes a statement or block of statements on the “True” path only, as presented in the following flowchart fragment, given in general form.
If Boolean_Expression evaluates to True, the statement, or block of statements, of the structure is executed; otherwise, the statements are skipped.
The general form of the Visual Basic statement is
Note that the statement or block of statements is indented by 2 spaces.
In the next example, ...
Get Visual Basic and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.