RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Currency::+ Operator (Currency&)

Adds a specified value to the System::Currency::Currency object.

Pascal
operator +(const rhs: Currency&);
operator +(rhs: Integer);
operator +(rhs: double);
C++
__fastcall Currency operator +(const Currency& rhs) const;
__fastcall Currency operator +(int rhs) const;
__fastcall Currency operator +(double rhs) const;

Use the System::Currency::+ to add the value specified by the rhs operand to the System::Currency::Currency object. If the rhs operand is another System::Currency::Currency object, the System::Currency::+ adds its value to the System::Currency::Currency object. If it is an integer or double value, the System::Currency::+ adds that value to the value of the System::Currency::Currency object. 

Note that there are two related friend System::Currency::+s:

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

returns a new System::Currency::Currency object that is the sum of int lhs and System::Currency::Currency object rhs.

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

returns a new System::Currency::Currency object that is the sum of double lhs and System::Currency::Currency object rhs. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!