To add a function, click on the Functions
tree with the right mouse button. A pop up menu appears. In the menu select the New
choice. This opens the template
selection dialog, in which you select the
template for your function. For example, if you want to sum
numerical matrices together, you can select the plus template.
editor window opens up. Here you set up input and output
matrices and parameters of the function.
Once the function
is saved, it appears
on the function tree view in the project toolbox, in the same way as
seen for the matrices. Its output matrices appear on the matrix tree
functionRight click with the mouse
on the function name in the tree and select the Edit Function
menu. The function editor
opens, with the entered input matrices, output matrices and parameters
in place. You can change them and save the function again.
Remove one or more functionsTo
remove one or more functions:
At this point, the system tries to remove all the selected matrices.
the functions you want to remove. If you select a package (directory),
you indicate that you want to remove all the functions in the package.
- Click with the right mouse button and in the popup menu
select Remove Function.
The only possible reason why you cannot remove a
function is that a timer executes it. In this case a message like the following is showed:
In this case, to be able to remove the function, first remove the
timer, then the function.
If it is possible to remove the functions, you need to confirm.
remove a function, the output matrices of the function are saved with
the last content they assumed before the function was removed.
the function has been removed they can be edited (they are base
View a functionRight click with the mouse on the function name in
the tree and select the View Function menu, which opens the Function Viewer. You can also open the viewer double-clicking on the function's name.
a functionRight click with the mouse on the function name in
the tree and select the Rename Function menu. The name-package dialog
appears. Set the new name and package and click OK. The function is
renamed, both in the project toolbox and in the file system.
Move one or more functionsRight
the mouse on the function name in the tree and select the Move Functions menu. Select the package where you want to move the function to using the choose package dialog. If you select more functions all will be moved to the final package.
Comment a functionRight click
with the mouse on the function name in the tree and select the Comment
Function menu. Then you can write your comment in the comment dialog.
Force a function recalculationRight
click with the mouse on the function name in the tree and select the Force
Recalculation menu. The
function is recalculated and its
output matrices assume the newly calculated values.
should be never needed to manually recalculate a function because a
function is recalculated automatically when one of the input matrices
changes its content.
In some specific cases, however, it can
be useful, for example:
- functions that
produced errors when calculated.
- functions that
change their output values even if the input values did not change,
with no input matrices
Get some information about a functionRight
click with the mouse on the function name in the tree and
select the Info Function menu. The function information view
Duplicate a functionRight clicking with the
mouse on the function name in the tree and
selecting the Duplicate Function menu
editor is opened to create a function that has the same
content of the duplicated function: same input matrices and same
parameters. Only the output matrices are not assigned, because clearly
they must be created with the function.
typical reason to duplicate a function is when you need to create
several functions with the same template and parameters of another
one(for example different queries with the same JDBC parameters).
Expression ParserIn the popup menu
that appears right clicking on the tree select the Expression
Parser menu. In this way you
open the Expression
Parser wizard, used to write text expressions that are
transformed in functions and matrices.