bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
NPer# Function Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
NPer# returns the number of periods for an investment based on periodic,
constant payments and a constant interest rate.
NPer# (rate#, pmt#, pv#, fv#, type%, status%)
■ The argument rate# is the interest rate per period. For example,
if you get a car loan at a 10% annual interest rate and make monthly
payments, the rate per period would be .10/12, or .0083.
■ The pmt# is the payment made each period, and cannot change over the
life of the annuity. Typically, pmt# contains principal and interest.
■ The argument pv# is the present value, or lump sum that a series of
payments to be paid in the future is worth now. For example, when
you borrow money to buy a car, the loan amount is the present value
to the lender of the monthly car payments you will make.
■ The argument fv# is the future value, or cash balance sometime in
the future after the final payment is made. The future value of a
loan, for example, is 0. As another example, if you think you will
need $50,000 in 18 years to pay for your child's education, then
$50,000 is the future value.
■ The argument status% can be any variable that returns information
about the success or failure of the calculation. The value of status%
will be 0 if the calculation was successful, and 1 if it was not.
Usage Notes
■ An annuity is a series of constant cash payments made over a
continuous period of time. An annuity can be a loan (such as a
home mortgage), or an investment (such as a monthly savings plan).
■ For all arguments, cash you pay out, such as deposits to savings,
is represented by negative numbers; cash you receive, such as
dividend checks, is represented by positive numbers.
■ The formula for NPer# is found in the BASIC Language Reference
manual.
Important
■ To use NPer# in the QBX environment, use the FINANCER.QLB Quick
library. To use NPer# outside the QBX environment, link your program
with the appropriate FINANCxx.LIB file. Depending on the compiler
options you chose when you installed BASIC, one or more of the
following files will be available:
Filename Compiler options
════════════ ═════════════════════════════════════════════
FINANCER.LIB 80x87 or emulator math; DOS or OS/2 real mode
FINANCAR.LIB Alternate math; DOS or OS/2 real mode
FINANCEP.LIB 80x87 or emulator math, OS/2 protected mode
FINANCAP.LIB Alternate math; OS/2 protected mode
■ The FINANC.BI header file contains the necessary function
declarations for NPer#.
■ For more information on using libraries, see "Creating and Using
Quick Libraries" and "Using LINK and LIB" in the BASIC Programmer's
Guide.