Mathematical symbols
No edit summary |
No edit summary |
||
Line 95: | Line 95: | ||
|} | |} | ||
Tags: Equal sign, Larger than sign, Lesser | Tags: Equal sign, Larger than sign, Lesser than sign, Larger or equal, Less or equal | ||
[[Category:OCLOperators]] | [[Category:OCLOperators]] |
Revision as of 05:51, 13 November 2023
<> ( object : OclAny ) : Boolean
Returns true if self is a different object from object.
Expression | Result |
---|---|
let a : String = 'a', b : String = 'a' in a <> b | false |
let a : Integer = 2, b : Real = 2.0 in a <> b | false |
let a : Integer = -2, b : Integer = 2 in a <> b | true |
= ( object : OclAny) : Boolean
Returns true if self is equal to object.
Expression | Result |
---|---|
let a : String = 'a', b : String = 'a' in a = b | true |
let a : Integer = 2, b : Real = 2.0 in a = b | true |
let a : Integer = -2, b : Integer = 2 in a = b | false |
< ( object : T ) : Boolean
Returns true if self is comparable to object and less than object.
Expression | Result |
---|---|
let a : Integer = 1, b : Integer = 2 in a < b | true |
let a : Real = 1.5, b : Integer = 2 in a < b | true |
let a : String = 'Anteater', b : String = 'Aardvark' in a < b | false |
> ( object : T ) : Boolean
Returns true if self is comparable to object and greater than object.
Expression | Result |
---|---|
let a : Integer = 1, b : Integer = 2 in a > b | false |
let a : Real = 1.5, b : Integer = 2 in a > b | false |
let a : String = 'Anteater', b : String = 'Aardvark' in a > b | true |
<= ( object : T ) : Boolean
Returns true if self is comparable to object and less than or equal to object.
Expression | Result |
---|---|
let a : Integer = 1, b : Integer = 2 in a <= b | true |
let a : Real = 1.5, b : Integer = 2 in a <= b | true |
let a : String = 'Anteater', b : String = 'Aardvark' in a <= b | false |
>= ( object : T ) : Boolean
Returns true if self is comparable to object and greater than or equal to object.
Expression | Result |
---|---|
let a : Integer = 1, b : Integer = 2 in a >= b | false |
let a : Real = 1.5, b : Integer = 2 in a >= b | false |
let a : String = 'Anteater', b : String = 'Aardvark' in a >= b | true |
Tags: Equal sign, Larger than sign, Lesser than sign, Larger or equal, Less or equal
This page was edited more than 9 months ago on 03/26/2024. What links here