Sedona XPRESSion Evaluator Reference Guide
Define Function VI
Establishes a user-defined function for use in other function definitions and expressions.
This VI is very useful for building sophisticated function libraries. The function can be any BNF expression containing any built-in function OR another user-defined function. The order in which multiple calls to Define Function are executed is unimportant, even if the function definitions are interrelated. If the function is referenced by other previously-defined functions, then all of those "parent" functions are updated to reflect the new form of function. Similarly, if function references other user-defined functions (which may or may not have been defined yet), then it will be updated when any of its "child" functions are (re)defined.
![]() |
![]() |
error in (no error) describes any error conditions prior to this VIs execution. |
![]() |
function
descriptor function descriptor is a string describing
the form of a user-defined function. The syntax for
function descriptor is: FuncName(a,b,c...z) = <expr> where a,b,c ... are dummy variables and can be any convenient set of variable names, and <expr> is any Backus-Naur expression containing only the dummy variables a,b,c... as identifiers. The function descriptor may also contain references to other user-defined functions (and, of course, to any built-in functions). The following are all valid function descriptors: MyFunc(a,b,c) = a * b ^ c * OurFunc(a*b,log(c),1.3E-4) YourFunc(x,y) = (x ^ (2 * y)) * MyFunc(x,x^2,x^3) OurFunc(one,two,three) = one + two + sin(three) |
![]() |
initialize (F) specifies whether or not to initialize the internal database of user-defined functions. If TRUE, then all user-defined functions currently loaded in memory will be deleted. If FALSE, then the function described in function descriptor is appended to the internal database of user-defined functions. |
![]() |
error out contains error information. If the error in cluster indicated an error, the error out cluster contains the same information. Otherwise, error out describes this VIs error status. |
![]() |
index out |
![]() |
user func |