PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Calculating the interest rate of a loan
FinInterestRate (Example)
Calculating the interest rate of a loan
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC) 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