

IRR() - Internal rate of return
| Type
| Field
| Description
|
| double
| dInitial
| Initial investment
|
| double
| dInt
| Guess interest percentage
|
| double
| dCF[]
| Array of cash flows
|
| integer
| iCount
| Number of cash flows in array
|
| integer
| iBasis
| Value:
0 = end 1 = begin |
PowerBuilder Function declaration
function double IRR(double dInitial, double dInt, double dCF[], int iCount, int iBasis) library "IFL16.DLL"
Visual Basic Function declaration
Declare Function IRR lib "IFL16" (ByVal dInitial As Double, ByVal dInt As Double, ByVal dCF[] As Double, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
Access Function declaration
Declare Function IRR lib "IFL16" (Byval dInitial As Double, ByVal dInt As Double, dCF As Any, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
C/C++ Synopsis
#include "function.h"
double IRR(double dInitial, double dInt, double *dCF, int iCount, int iBasis)
32 bit DLL declarations
PowerBuilder Function declaration
function double IRR(double dInitial, double dInt, double dCF[], int iCount, int iBasis) library "IFL32.DLL"
Visual Basic Function declaration
Declare Function IRR lib "IFL32" (ByVal dInitial As Double, ByVal dInt As Double, ByVal dCF[] As Double, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
Access Function declaration
Declare Function IRR lib "IFL32" (Byval dInitial As Double, ByVal dInt As Double, dCF As Any, ByVal iCount As Integer, ByVal iBasis As Integer) As Double
C/C++ Synopsis
#include "function.h"
double IRR(double dInitial, double dInt, double *dCF, short sCount, short sBasis)
Example:
| dInitial
| =
| 1,200
|
|
| dInt
| =
| 0.05
| (5%)
|
| dCF[1]
| =
| 300
|
|
| dCF[2]
| =
| -200
|
|
| dCF[3]
| =
| 500
|
|
| dCF[4]
| =
| -150
|
|
| dCF[5]
| =
| 275
|
|
| iCount
| =
| 5
|
|
| iBasis
| =
| 0
| (end of period)
|