OCLOperators whenfalse
No edit summary
(Added Edited template with July 12, 2025.)
 
Line 1: Line 1:
{{Edited|July|12|2025}}
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.  



Latest revision as of 06:33, 20 January 2025

This page was created by Charles on 2024-08-16. Last edited by Edgar on 2025-01-20.

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: