ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Financial functions
  • Calculating the interest rate of a loan
FinInterestRate (Example)
Calculating the interest rate of a loan
WEBDEV - Server codeAjax The following code is used to calculate the interest rate of a loan. The number of payments required to pay off the capital, the payment value and the amount of the loan are entered by the user in edit controls (EDT_NbPayments, EDT_PaymentValue, EDT_Amount).
// -- Click code on BTN_InterestRate
// Declare the variable
ResInterestRate is real
// Calculate the interest rate
ResInterestRate = FinInterestRate(EDT_NbPayments, -EDT_PaymentValue, EDT_Amount)
IF FinError() = 0 THEN
Info("The interest rate is: " + ResInterestRate)
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