Labeling Values

 

What Are Variables?

You can use labels, called variables, to define values and write equations using those labels. Variables serve two purposes: 1) they act as descriptors of the data being entered; and 2) make it easy to perform what-if scenario analysis.

Let's illustrate with an example: You have 40 pounds of bananas at $1.50 per pound. How many dollars of bananas do you have? One way to solve this example is to just do the math:

40 * 1.50 = (CALC)

The problem is that there is no indicator as to what the 40 and 1.50 represent. If you look at this note later they are just numbers and results. In addition it isn't clear which numbers to change if you wish to recalculate.

One way to solve this would be to write a note after the equation to say what 40 and 1.50 are. Another approach is to use variables. Let's define this another way:

Bananas: 40
Price Per Pound: 1.50
Total Bananas = Bananas * Price Per Pound

Now when you select (CALC) you get an extra text line. The note now looks like this:

Bananas: 40
Price Per Pound: 1.50
Total Bananas = Bananas * Price Per Pound
Total Bananas: 60

Declaring Variables

To declare a variable use it in an equation and, on its own line, enter its name, followed by a colon. To assign a value to a variable enter a number after the colon. To calculate a variable leave its value blank.

We declared the values for Bananas and Price Per Pound in the example above and assigned values of 40 and 1.50 to them, respectively. MathPoint didn't find Total Bananas so declared it and, because it was blank and all the other variables were known, it also calculated it.

Alternatively we could have declared all the variables ourselves:

Bananas: 40
Price Per Pound: 1.50
Total Bananas = Bananas * Price Per Pound
Total Bananas:

Select (CALC) to compute Total Bananas.

Remember: these variables can be anywhere in the note, before or after the equation, as long as each variable and the equation is on its own text line. (Both can also wrap automatically to the next line but cannot include a return in the middle.) In addition each variable can be defined with a value only once but can be used in as many equations as desired. Finally, as discussed in note basics, you can write text on any lines around the equations and variables.

Let's expand this example and say that your budget is $50 for bananas. How many pounds of bananas can you calculate? To solve, enter 50 for Total Bananas and delete the number (double-click and backspace) after Bananas so your note now looks like this:

Bananas:
Price Per Pound: 1.50
Total Bananas = Bananas * Price Per Pound
Total Bananas: 50

Select (CALC) to compute 33.33 pounds of bananas.

Auto-Declaring Variables

MathPoint will auto-declare variables. Any variables that are found in an equation but not declared will automatically be declared. In the example above, Total Bananas was auto-declared. Because it was also unknown it was calculated.

Auto-declaration makes note creation significantly faster. Enter an equation and select (CALC). All undeclared variables will be declared at the bottom of the note.

Documenting Variables

While a variable does serve as an indicator to what the number is, the above example is still incomplete. There is no indication as to the currency used nor what bananas are measured in. You can add additional clarification to your variables by adding currencies before or text descriptions after the values. MathPoint will "calculate around" that information. To re-write the above:

Bananas: pounds
Price Per Pound: $1.50
Total Bananas = Bananas * Price Per Pound
Total Bananas: $50

Select (CALC) to calculate the pounds of Bananas. Notice how it inserts 33.33 before pounds and after the variable declaration.

Defining Variables

Variables can have any combination of letters (lowercase and uppercase), numbers, underscore characters and spaces. Positive examples include:

Feet
Initial Velocity
Date 1
Payment 30_365

Examples that don't work:

3 Feet [can't start a variable with a number]
Interest% [an illegal symbol]
Feet/Second [another illegal symbol]

A note about non-Western letters: we have tested with European character sets but have not tried Russian, Chinese, Japanese and other Asian-based characters.

A note about implicit multiplication: MathPoint can use implicit multiplication in its formulas. For example, instead of typing 3*x^2 you could type 3x^2. By default this capability is turned off and can be turned on in the note Settings. By turning on implicit multiplication, though, you lose the ability to start variables with numbers. With implicit multiplication, 3x is considered 3*x; x3 is considered a variable.

A note about case sensitivity: Variables can either be case sensitive or insensitive. When variables are case sensitive, variable "A" and variable "a" are two different variables. When variables are case insensitive, variable "A" and variable "a" are considered the same. Case sensitivity, available in the Note Settings, are declared for an entire note. Either all variables in the note are case sensitive or all variables are case insensitive. By default, MathPoint does not know what you intended and will ask if it experiences a potential conflict.

Restricted Variables

MathPoint currently has a few restricted variable names: pi, true and false. pi is pre-defined to 3.14159265359 and cannot be changed. In addition, the variables "pi", "Pi", "pI", and "PI" (no quotes) will all be treated as the same variable. true and false are defined as well and, if used in a formula, will translate to 1 and 0, respectively.