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

 

User-defined Constants

A constant is like a variable in that it can be used instead of a number. However, you cannot change the value of a constant simply by assigning it a different value.

You create a constant by first defining a variable of the same name. For example, to define the constant c as the velocity of light in a vacuum, evaluate the expression:

c = 299792458 (This is the exact value, by definition, in metres per second, as of 1998.)

Then select the menu item View / Variables. This will show the Variables window which lists all variables, constants and user-defined functions, and allows you to convert variables to constants, and vice versa. Scroll the display if necessary until you see the variable c and do a right-click on it. A menu pops up to allow you to change this variable to a constant. If you do this, close the window, and try to give c a value (even the same value), UltimaCalc will object. If you do need to change the value of a constant, change it to a variable first.

For a handy listing of more than a hundred values of physical and conversion constants, and some others too, see the constants reference window.

The constant pi is special in that it cannot be turned into a variable. The variable last is also special, in that it cannot be made a constant. Neither pi nor last can be deleted.

You can change the value of a constant (other than pi) by converting it to a variable, changing its value, and then making it a constant again.