Boolean Variables: Underused and Unappreciated
May 16, 2012 Ted Holt
Boolean variables can have only two values: true and false. In CL, they are known as logical variables. In RPG, they’re called indicator variables. They’re not essential; I got by without them for years. But they are useful. Let’s take a closer look at Boolean variables. Let me share a story with you. Some years ago, a certain factory started faxing requirements reports to their suppliers. The suppliers liked the reports, but some of them asked if they might receive the requirements electronically in a spreadsheet format. The IT department added a one-digit code to the database.
|