Return to the home page.

The Ultimate Windows Math Toolbox

 

bullet Ver 3.0.697
23 June 2008
bullet Free support
bullet Only $44.85 (US)
(Professional)
Click to buy UltimaCalc Professional
bullet Only $34.85 (US)
(Standard)
Click to buy UltimaCalc Standard.

bullet Free download

<<< Prev  Next >>>

 

Function Definition Window

Having clicked with the right mouse button inside the Variables window and chosen to either edit a function or define a new one, a new window will open to allow you to edit the definition. The image below shows a new function called julian being defined. (This function calculates the Julian day number for a given date.) If an existing function was being edited, the upper text box would show the function's name, but you would not be able to change it.

Function definition window

As shown, the name of the function is entered into the upper text box, and its definition is entered into the lower box. To the left of the equals sign is a list of the parameters that the function will take. To the right of the equals sign is an expression, or a series of expressions, that will be evaluated with the variables named in the parameter list being given the values supplied when the function is used.

For example, after clicking on OK, the function julian will have been defined, and evaluating julian(today) will convert UltimaCalc's internal representation of today's date into the Julian Day Number for today.

A more complex example would be the function area with definition:

(a,b,c)=s=(a+b+c); sqrt(s*(s-a)*(s-b)*(s-c))

This function calculates the area of a triangle with sides a, b, and c, using another variable s to make the calculation simpler.

User-defined functions are saved along with user-defined variables and constants in a plain text file.