RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Currency::Currency Constructor ()

Creates and initializes a System::Currency::Currency object.

Pascal
constructor Create;
constructor Create(val: double);
constructor Create(val: Integer);
constructor Create(const src: CurrencyBase&);
constructor Create(const src: Currency&);
constructor Create(const src: AnsiString&);
C++
__fastcall Currency();
__fastcall Currency(double val);
__fastcall Currency(int val);
__fastcall Currency(const CurrencyBase& src);
__fastcall Currency(const Currency& src);
__fastcall Currency(const AnsiString& src);

Use System::Currency::Currency to instantiate a System::Currency::Currency object. 

When called with no parameters, the resulting object has a value of 0. 

When called with a System::Currency::Currency object as the src parameter, the resulting object is a copy of src (the copy constructor). 

When called with a System::Currency::CurrencyBase object as the src parameter, the resulting object has the same value as the src parameter. System::Currency::CurrencyBase is the base class for the System::Currency::Currency type. It has a single member, a public Val field that represents the value of the object. 

When called with an AnsiString object as the src parameter, the value of the resulting object is the parsed value of the AnsiString. The AnsiString must represent a numeric value within the range valid for System::Currency::Currency (-922337203685477.5808 to 922337203685477.5807). 

When called with a double or integer as the val parameter, the value of the resulting object is the value of the val parameter. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!