ECalcPad. User-defined functions. Multiline extended calculator.
ECalcPad home Download ECalcPad free DataOdyssey Projects home DataOdyssey Express - Data Mining made easy EasySql4Fox - VFP adapt to SQL(MySQL,ORACLE) quickly

User-defined functions.

When you call functions list, you can see line-title "user-defined functions" at the bottom of the list. All the functions you have created will be listed below this line. The last line of the list is always "Create or edit a user-defined functions..." line.

03_02.gif (15473 bytes)

Select this line and click "Select" to call function editor. Also, you can do the same by clicking "More..." button in the program toolbar and selecting the corresponding item. 

The window of function editor looks like main window of the program. Still, it is of different color and has another set of toolbar buttons. When called, function editor offers to create a new function. All names of user-defined functions should begin with UDF_ prefix. Type function name in the "Name" box.

All rules applicable to your calculations are used here. Mind this:

маркированный список You can refer to one or several (up to ten) parameters with the following syntax: Argument1, Argument2, ..., Argument10. These parameters are passed to the function when it is used in a calculation.
маркированный список You should use RETURN word in "variable" cell to return the result of a function.
маркированный список Existing functions are loaded via a simple list (not an explorer).

By default, new function blank looks like this:

ECalcPad_UDF2.gif (13313 bytes)

Add needed lines and create expressions. Save your function with Button_Save.gif (125 bytes) button.

To load and edit a new function click Button_Open.gif (98 bytes) button, find it in the list and click "OK" button.

ECalcPad_UDF3.gif (16564 bytes)

When you save a separate function (new or changed), all functions will be recompiled. Also, you can recompile all functions manually (if you face an error calling a function) by "More.." button in the toolbar.