

XNPV() - Net present value
| Type
| Field
| Description
|
| double
| dInt
| Interest percentage
|
| double
| dCF[]
| Series of cash flows
|
| long
| lDate[]
| Series of dates
|
| integer
| iCount
| Number of cash flows in array
|
| integer
| iBasis
| Value:
0 = end 1 = begin |
PowerBuilder Function declaration
function double XNPV(double dInt, double dCF[], long lDate[], int iCount, int iBasis) library "IFL16.DLL"
Visual Basic Function declaration
Declare Function XNPV lib "IFL16" (ByVal dInt As Double, ByRef dCF[] As Double, ByRef lDate[] As Long, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
Access Function declaration
Declare Function XNPV lib "IFL16" (ByVal dInt As Double, dCF As Any, lDate As Any, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
C/C++ Synopsis
#include "function.h"
double XNPV(double dInt, double *dCF, long *lDate, int iCount, int iBasis)
32 bit DLL declarations
PowerBuilder Function declaration
function double XNPV(double dInt, double dCF[], long lDate[], int iCount, int iBasis) library "IFL32.DLL"
Visual Basic Function declaration
Declare Function XNPV lib "IFL32" (ByVal dInt As Double, ByRef dCF[] As Double, ByRef lDate[] As Long, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
Access Function declaration
Declare Function XNPV lib "IFL32" (ByVal dInt As Double, dCF As Any, lDate As Any, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
C/C++ Synopsis
#include "function.h"
double XNPV(double dInt, double *dCF, long *lDate, short sCount, short sBasis)
Example:
| dInt
| =
| 0.09
| (9%)
|
| dCF[1]
| =
| -10000
| Initial outflow
|
| dCF[2]
| =
| 2750
|
|
| dCF[3]
| =
| 4250
|
|
| dCF[4]
| =
| 3250
|
|
| dCF[5]
| =
| 2750
|
|
| dDate[1]
| =
| 33604
| Initial date
|
| dDate[2]
| =
| 33664
|
|
| dDate[3]
| =
| 33907
|
|
| dDate[4]
| =
| 34015
|
|
| dDate[5]
| =
| 34060
|
|
| dCount
| =
| 5
|
|
| dBasis
| =
| 0
| 365 days
|