Visual OCL

TU-Berlin | Faculty IV | Institute ISTI | Research group TFS

User Guide for the Eclipse VOCL-Plugin
group 2

small logo
section: < previous | next >
| |
chapter: << previous | next >>

3.3 If-then-else expression

The if-then-else which has the form if [expression] then [expression1] else [expression2], is like the Constraint a container for other VOCL expressions.
For creating a if-then-else expression you have to select the entry if-then-else expression in the editor palette and move the mouse cursor inside a Constraint. A dialog is not opened because there is no need for any input for creating the figure.  Then a figure appears which is divided into three parts:
  1. in the if part you can define a condition as usual
  2. in the then and else part you can create any VOCL expression

Fig. 3.3.1 if-then-else expression
©2005 TFS