The standard type Real represents the mathematical concept of real. Note that UnlimitedNatural is a subclass of Integer and that Integer is a subclass of Real, so for each parameter of type Real, you can use an unlimited natural or an integer as the actual parameter. Real is itself an instance of the metatype PrimitiveType (from UML).
conformsTo
OclAny
Operations
=(object2 : OclAny) : Boolean
precedence:
EQUALITY
Returns true if the numeric value of self is the same as the numeric value of object2, false otherwise.
<>(object2 : OclAny) : Boolean
precedence:
EQUALITY
Returns true if the numeric value of self is the not the same as the numeric value of object2, false otherwise.
+(r : Real) : Real
precedence:
ADDITIVE
The value of the addition of self and r.
-(r : Real) : Real
precedence:
ADDITIVE
The value of the subtraction of r from self.
*(r : Real) : Real
precedence:
MULTIPLICATIVE
The value of the multiplication of self and r.
-() : Real
precedence:
UNARY
The negative value of self.
/(r : Real) : Real
precedence:
MULTIPLICATIVE
The value of self divided by r. Evaluates to invalid if r is equal to zero.
>(r : Real) : Boolean
precedence:
RELATIONAL
True if self is greater than r.
<(r : Real) : Boolean
precedence:
RELATIONAL
True if self is less than r.
<=(r : Real) : Boolean
precedence:
RELATIONAL
True if self is less than or equal to r.
>=(r : Real) : Boolean
precedence:
RELATIONAL
True if self is greater than or equal to r.
abs() : Real
The absolute value of self.
floor() : Integer
The largest integer that is less than or equal to self.
max(r : Real) : Real
The maximum of self and r.
min(r : Real) : Real
The minimum of self and r.
oclAsType<TT>(type : Classifier<TT>) : TT
round() : Integer
The integer that is closest to self. When there are two such integers, the largest one.
toString() : String
Converts self to a string value.