Nested IF Statements
Red Diamond A8 has eight cases. The diamonds B8, C8, and D8 each represent similar cases. This optimized flowchart requires some effort to maintain and is not as clear is the chart below. Flow charts can provide some visual excitement and advertising, but in general, there are simpler, more information rich representations. This example emphasizes easy of human reading. Some programs which handle high volumes of transactions, optimization is more crucial. |
Case Statements
Somewhere after two or three levels of IF statements, the programmer simplifies the code to make human comprehension easier. In some langatuages, a case statement handles this situation. Sometimes case statements require literals, which can restrict the adaptability of the case statement. If some languages, a long list of non-nested IF statments works best
Somewhere after two or three levels of IF statements, the programmer simplifies the code to make human comprehension easier. In some langatuages, a case statement handles this situation. Sometimes case statements require literals, which can restrict the adaptability of the case statement. If some languages, a long list of non-nested IF statments works best
The process boxes have the same sequence as in the nested IF statements, but the navigation is simpler.
In many business applications, the passage of time makes a difference in the logic. In PeopleSoft and in SRN, tables often have an effective date. From one year to the next, the program chooses a table according the to business date, The converting this source code to a tale lookup might be better in the long run. See Semi-Interpretive. |