ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Financial functions
  • Net current value of an investment
FinNetCurrentVal (Example)
Net current value of an investment
The following code is used to calculate the net current value of an investment. This investment of 100000 Euros must bring in:
  • 6000 Euros the first year,
  • 3000 Euros the second year,
  • 4500 Euros the third year,
  • 8000 Euros the last year.
The yearly refresh rate: 10 %
// --Click code on BTN_CurrentNetVal
// Declare the variable
ResCurrentNetVal is real
 
// Create and initialize the matrix
MatCreate("Matrix")
MatWrite("Matrix", -100000, 1, 1)
MatWrite("Matrix", 6000, 1, 2)
MatWrite("Matrix", -3000, 1, 3)
MatWrite("Matrix", 4500, 1, 4)
MatWrite("Matrix", 8000, 1, 5)
 
// Calculate the net current value
ResCurrentNetVal = FinNetCurrentVal(10, "Matrix", 1)
IF FinError() = 0 THEN
Info("The current net value is: " + ResCurrentNetVal)
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

Last update: 05/26/2022

Send a report | Local help