PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Future value of an investment
FinFutureVal (Example)
Future value of an investment
Reports and Queries The following code is used to calculate the future value for an investment. The initial capital, the periodic deposit, the total number of periods and the interest rate are entered by the user in edit controls (EDT_InitCapital, EDT_Deposit, EDT_NbPeriods, EDT_Rate).
We assume that the payments must be made at the end of the period (False constant).
// --Click code on BTN_FutureVal
// Declare the variable
ResFutureVal is real

// Calculate the current value
ResFutureVal = FinFutureVal(-EDT_InitCapital, -EDT_Deposit, EDT_NbPeriods, EDT_Rate, False)
IF FinError() = 0 THEN
Info("The future value is: " + ResFutureVal)
ELSE
// Display the error message
Error(ErrorInfo(errMessage))
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment