BOOL operator ==( const COleCurrency& cur ) const;
BOOL operator !=( const COleCurrency& cur ) const;
BOOL operator <( const COleCurrency& cur ) const;
BOOL operator >( const COleCurrency& cur ) const;
BOOL operator <=( const COleCurrency& cur ) const;
BOOL operator >=( const COleCurrency& cur ) const;
Remarks
These operators compare two currency values and return nonzero if the condition is true; otherwise 0.
Note The return value of the ordering operations (<, <=, >, >=) is undefined if the status of either operand is null or invalid. The equality operators (==, !=) consider the status of the operands.
Example
COleCurrency curOne(3, 5000); // 3.5
COleCurrency curTwo(curOne); // 3.5
BOOL b;
b = curOne == curTwo; // TRUE
curTwo.SetStatus(COleCurrency::invalid);
b = curOne == curTwo; // FALSE, different status
b = curOne != curTwo; // TRUE, different status
b = curOne < curTwo; // FALSE, same value
b = curOne > curTwo; // FALSE, same value
b = curOne <= curTwo; // TRUE, same value
b = curOne >= curTwo; // TRUE, same value
Note The last four lines of the preceding example will ASSERT in debug mode.
COleCurrency Overview | Class Members | Hierarchy Chart
See Also COleCurrency::GetStatus