Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
type TPaymentTime = (ptEndOfPeriod, ptStartOfPeriod);
function FutureValue(const Rate: Extended; NPeriods: Integer; const Payment, PresentValue: Extended; PaymentTime: TPaymentTime): Extended;
Returns the future value of an investment.
FutureValue returns the value of an investment of PresentValue where Payment is invested for NPeriods at the rate of Rate per period.
TPaymentTime indicates when interest is calculated. When ptStartOfPeriod is specified for PaymentTime, interest is calculated on the principle balance at the beginning of the payment period; when ptEndOfPeriod is specified for PaymentTime, interest is calculated at the end of the payment period.
var fv : extended;
fv:= FutureValue(0, 12, 2, 100,ptStartOfPeriod);
showmessage(FloatToStr(fv))
//will display -124
|
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|