OCLOperators whenfalse
(Created page with "The '''whenfalse''' OCL operator is the opposite of the whentrue operator. It is used to specify an expression to be run when the boolean argument expression is false. It can be used to chain boolean expressions. ==== Example ==== let x=SomeObject.SomeEnum in (   (x=#Enum1).whenfalse(SomeObject.DoYourThing1);   (x=#Enum2).whenfalse(SomeObject.DoYourThing2);   (x=#Enum3).whenfalse(SomeObject.DoYourThing3) )")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The '''whenfalse''' OCL operator is the opposite of the [[Documentation:OCLOperators whentrue|whentrue]] operator. It is used to specify an expression to be run when the boolean argument expression is false.
The '''whenfalse''' OCL operator is the opposite of the [[Documentation:OCLOperators whentrue|whentrue]] operator. It is used to specify an expression to be run when the Boolean argument expression is false.  


It can be used to chain boolean expressions.
It can be used to chain Boolean expressions.


==== Example ====
==== Example ====
Line 9: Line 9:
   (x=#Enum3).whenfalse(SomeObject.DoYourThing3)  
   (x=#Enum3).whenfalse(SomeObject.DoYourThing3)  
  )
  )
==== See: ====
* [[Documentation:OCLOperators whentrue|OCLOperator whentrue]]

Latest revision as of 05:23, 19 August 2024

The whenfalse OCL operator is the opposite of the whentrue operator. It is used to specify an expression to be run when the Boolean argument expression is false.

It can be used to chain Boolean expressions.

Example

let x=SomeObject.SomeEnum in (  
  (x=#Enum1).whenfalse(SomeObject.DoYourThing1);  
  (x=#Enum2).whenfalse(SomeObject.DoYourThing2);  
  (x=#Enum3).whenfalse(SomeObject.DoYourThing3) 
)

See:

This page was edited 32 days ago on 08/19/2024. What links here