Payment Function | |
Returns the amount of each periodic payment on a fixed-interest loan.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION Payment(
nPrincipal AS FLOAT,
nInterestRate AS FLOAT,
nPayments AS FLOAT
) AS FLOAT
public static Float Payment(
Float nPrincipal,
Float nInterestRate,
Float nPayments
)
Request Example
View SourceParameters
- nPrincipal
- Type: Float
Specifies the beginning principal of the loan.
- nInterestRate
- Type: Float
Specifies the fixed interest rate per period. If monthly payments are made on the loan but the interest rate is annual,
divide the annual interest rate by 12.
- nPayments
- Type: Float
Specifies the total number of payments to be made on the loan.
Return Value
Type:
Float
Numeric
Remarks
Payment( ) assumes a constant periodic interest rate and assumes that payments are made at the end of each period.
Examples 1STORE 100000 to gnPrincipal
2STORE .105/12 TO gnInterest
3STORE (20*12) TO gnPayments
4Clear
5? Payment(gnPrincipal, gnInterest, gnPayments)
See Also