contents.gifprev1.gifnext1.gif

Non-Visual objects

There are several non-visual objects (NVO). The NVO's are organized as per chapter in this on-line help file. The following NVO's are included in the file NVO_IDEX.PBL:

ifl00090000.gif NVO_INTEREST

ifl00090000.gif NVO_FINANCIAL

ifl00090000.gif NVO_RATIO

ifl00090000.gif NVO_DEPRECIATION

You can include this file in all your projects by adding it to your list of files.

The functions within these NVO's are all preceded by "f_". For example the non-visual object NVO_INTEREST includes the following functions:

ifl00090000.gif F_AAPR()

ifl00090000.gif F_ACCRINT()

ifl00090000.gif F_ACCRINTM()

ifl00090000.gif F_APR()

ifl00090000.gif Etc.

Using NVO's means that you do not need to declare the function anymore. The functions are already declared in the NVO. You do need to CREATE the NVO before you can use it. DO NOT forget to DESTROY the NVO after you are finished. The functions are called with the dot notation method.

Example:

/* Declare the following instance variable at the application level */

nvo_interest invo_interest

/* This script calculates the number of terms needed to reach a future value based on periodic payments using a call to an external DLL function */

dPmt = double(sle_pmt.text) // Periodic payment

dInt = double(sle_int.text) // Annual percentage

dFV = double(sle_fv.text) // Goal future value

/* Create the NVO (is normally done at application level) */

invo_interest = create nvo_interest

/* Call TERM function from NVO and put result in an editbox */

sle_pv.text = string &

(invo_interest.f_term( dPmt, dInt, dFV ))

/* When finished destroy the NVO (normally done when leaving the application) */

destroy invo_interest