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 >>>

 

Variables

A variable is nothing more than a named object that refers to some number. A variable is given (or assigned) a value by using the equals sign:

X = 12.3 creates the variable X if it does not already exist, and sets its value to 12.3

A variable can be used in place of a number. So, having defined X as in the previous paragraph, X+5 gives 17.3

If you execute X = 23.5 and then calculate X+5 you now obtain 28.5

You can put more than one expression on one line, each separated by a comma or a semicolon. For example, you can enter A = -800, B = 81; A/B

And you can do M = 0 and then do M = M + 3 and M = M + 5 and so on to accumulate values into M.


A variable's name is written as a letter or underscore character, optionally followed with any combination of letters, digits or underscore characters. There can be up to 15 characters in a name.

If you want to, you can use the name of a function as the name of a variable, but this can lead to confusion (for you, not for UltimaCalc!) and so is best avoided. For example, sqr = 4; sqr(sqr*sqr(81))+sqr gives the result 10.

There is also a 'variable' called last whose value is always the result of the last calculation made. So if you calculate 3/5 and then calculate last+1 the result is 1.6, and if you again calculate last+1 you now obtain 2.6. More interestingly, you can evaluate 2 then edit this to 2*last and then every time you hit the 'Enter' key you calculate the next power of 2.

Some special tool windows calculate multiple results. For your convenience, these values are stored in certain variables. These variables are created in the windows for the solution of triangles, the various forms of regression and for simultaneous linear equations. You can use these automatically created variables freely for your own purposes, even delete them, but these special tools may want to change their values, so please do not redefine these variables as constants.