|
The values of variables can be used to control a transition. Sometimes it is necessary to specify different actions depending on the value of some variable. This is done in SDL by using the decision construct. Figure 13 shows an example in SDL/GR of the decision construct. Depending on the value of the variable Counter, the process will perform a transition from S1 to S2 (value is less than 3), or to S3 (otherwise). Figure 13: Use of the decision In the decision symbol (a diamond with a number of paths for results) a question is asked. The question may have various answers, but when interpreting the decision, one and only one answer should be correct. To guarantee that one answer is always correct, the ELSE answer can be used. The decision symbol may have a number of different shapes. Some examples are given in figure 14. Figure 14: Further examples decision symbols |
Contact the webmaster with
questions or comments about this web site. |