Ending a Path (DPL Code)
DPL provides two equivalent keywords for ending a path through a decision tree. The keywords are quit and stop. You can use whichever keyword makes the program easier to read.
In some circumstances, you must use quit or stop to end a path through a decision tree. In other circumstances, these keywords are optional. They are required when they immediately follow the keywords on, to, or about, representing alternatives of a decision. They are also required when they immediately follow the keywords on or of, representing the outcomes of a chance event. In this case, the keywords quit and stop are needed to show that an unnamed event state leads immediately to the end of a path.
sequence: decide to pay 100 to quit
The keywords quit and stop are optional when they follow the keyword and or then, indicating that additional events follow along a path through a decision tree. In this case, the keywords and, then, quit, and stop can be omitted without changing the meaning of the program. This situation occurs when a path ends with the state of a named event or with a loss or gain.
sequence: decide to Buy.Yes and stop to Buy.No
Versions: DPL Professional, DPL Enterprise, DPL Portfolio