November 2002
Beginner
432 pages
11h 44m
English
One of the most important statements in a program is the If statement. With the logic that If provides, your application can begin to analyze data and make decisions based on the analysis. For example, your program can display a three-button message box and determine, with the If statement, which command button the user should click to close the message box.
If uses the comparison operators you learned in the previous chapters, such as < and >=. If performs one of two possible code actions, depending on the result of the comparison. In other words, If uses a comparison operator result to test data and might execute one or more lines of subsequent code, depending on the result.
Before If, code was executed sequentially, ...