Syntax
Payment( nLoan, nInterestRate, nPeriods ) --> nPaymentArguments
nLoan
nInterestRate
nPeriods
Example
PROCEDURE Main()
LOCAL nMonthlyRate := 0.1 / 12
Check( 'Round( Payment( 2000, nMonthlyRate, 24 ), 2 ) ', Round( Payment( 2000, nMonthlyRate, 24 ), 2 ), 92.29 )
Check( 'Payment( 1200, 0, 12 ) ', Payment( 1200, 0, 12 ), 100 )
RETURN
STATIC PROCEDURE Check( cTitle, xResult, xExpected )
QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )
RETURNOutput
Round( Payment( 2000, nMonthlyRate, 24 ), 2 ) OK
Payment( 1200, 0, 12 ) OK