OCLOperators nullValue
No edit summary
(Automatically adding template at the end of the page.)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A typed null value.  
A typed null value, used to assign a null value to an attribute, a variable or return null from a method.  
 
someobject.someattribute := <Type>.nullValue
<code>someobject.someattribute := <Type>.nullValue</code>
Do '''not''' use <Type>.nullValue to compare something to null, like this
[[Category:OCLOperators]]
vCurrent_UppdragTyp = Uppdragstyp.nullValue    -- WRONG
For comparing to null, use the operators [[OCLOperators isNull|.isNull]] or [[OCLOperators notNull|.notNull]]
[[Category:OCL General Operators]]
[[Category:OCL General Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:42, 10 February 2024

A typed null value, used to assign a null value to an attribute, a variable or return null from a method.

someobject.someattribute := <Type>.nullValue

Do not use <Type>.nullValue to compare something to null, like this

vCurrent_UppdragTyp = Uppdragstyp.nullValue    -- WRONG

For comparing to null, use the operators .isNull or .notNull

This page was edited 95 days ago on 02/10/2024. What links here