next up previous
Next: Calculating a sequence of Up: Using the MarkCalc Previous: More Rows

Names

The MarkCalc allows you to give a name to the result of a calculation. This allows you to refer to the result in a later calculation.

Suppose, for instance, you wanted to do five modular additions with a modulus of 4, and then do the same additions with a modulus of 7. In the first row, you might put an m in the name box and put a 4 in the Command box. After you execute the command using the "Do It" button, the name m will refer to the value 4. In the next five rows, you could put the five modular arithmetic problems; in each of these five rows, put an m in the Mod box. Now you can execute each of the five calculations, obtaining the results modulo 4. Next, change the command in the first row from 4 to 6. Execute that command using "Do It". Now m represents 6. Execute the next five commands, obtaining the results modulo 6.

You can use any letter or series of letters to represent a value. For example, instead of using m as the name, you could use mod as the name.

Names for values are sometimes referred to as variables by analogy to the variables used in algebra.

Here is another example of how you might use names. Your first row has the name key, and the command box contains a secret number to be used as the key for cryptography. Your second row has the name clear and the command box contains a string of symbols (starting and ending with the quote marks; see Subsection 3.5) such as

 "We meet at midnight"
Your third row has the name cyph, and in the command box is a formula for calculating the cyphertext from the cleartext and the key. For example, if you are using the Addition Cypher, the command box would read
 clear + key
and the Modulus box would have the appropriate modulus. After you executed all these commands, the name cyph would refer to the cyphertext, and you could send the cyphertext to another calculator, using the methods described in Subsection 4.1.


next up previous
Next: Calculating a sequence of Up: Using the MarkCalc Previous: More Rows

Lisa Eckstein
Tue Sep 17 22:19:41 EDT 1996