Hour 8Conditional Statements

Computer programs can perform tasks that range from very simple to very complex. More complicated tasks require making choices. Under some circumstances, you might want the program to perform one function; but under other circumstances, you might desire a different function. Conditional statements perform the act of choosing the appropriate function. A conditional is the statement or question asked in order to make a choice. It is somewhat like a question you might ask yourself, for example, “If I have enough money, can I buy an ice cream sundae?” In this hour, you learn about the various types of conditional statements available in COBOL, such as

• The If statement.

• Various conditions that can be tested using ...

Get Sams Teach Yourself COBOL in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.