System.Currency.operator -

From RAD Studio API Documentation
Jump to: navigation, search

C++

Currency __fastcall operator -(const Currency& rhs) const
Currency __fastcall operator -(int rhs) const
Currency __fastcall operator -(double rhs) const
Currency __fastcall operator -() const

Properties

Type Visibility Source Unit Parent
function public syscurr.h System Currency

Description

Subtracts a specified value from the Currency object.

Use the "-" binary operator to subtract the value specified by the rhs operand from the Currency object. If the rhs operand is another Currency object, the "-" operator subtracts its value from the Currency object. If it is an integer or double value, the "-" operator subtracts that value from the value of the Currency object.

Note that there are two related friend operators:

friend Currency __fastcall operator -(int lhs, const Currency& rhs);

returns a Currency object with a value that is the difference between int lhs and Currency object rhs.

friend Currency __fastcall operator -(double lhs, const Currency& rhs);

returns a Currency object with a value that is the difference between double lhs and Currency object rhs.

See Also