Overview


What It Is

Mark's Adding Machine (MAM) is a Windows based version of your typical desktop adding with a few embellishments that only a full-fledged computer could deliver. Some of these include:

What It Was Not But Now Is

MAM is now freeware!

You can now register online free at the MAM official website.

How to Register

Point your web browser at http://www.bigfoot.com/~addingmachine and follow the online instructions you will find there. You will receive your PassCodes via e-mail when you fill out the online registration form and click the submit button. It's fast. It's easy. It's free. What are you waiting for?

I can be reached via e-mail at addingmachine@bigfoot.com

System Requirements


MAM was developed using a Pentium 150 equipped with 80MB RAM and about 20GB of free hard drive space under Windows '95 with Microsoft Visual C++ v6.0 Professional Edition. Although it hasn't been tested yet on minimally configured machines, MAM is a relatively small application (by today's standards) and should be able to run on any machine capable of running Windows '95/'98/ME/NT.

The Minimum Requirements are:

What's New

New for version 1.30



Note that the Text-To-Speech features require a properly installed and configured compatible Text-To-Speech Engine. A compatible speech engine may be downloaded free of charge from the Microsoft Agent website on the Internet. Go to the downloads section and get one of the Lernout engines in the language of your choice. You might also need to get the SPCHAPI 4.0 runtime binaries, which are also available free of charge. Once you have these installed, you will probably need to shut down and restart your computer in order to use them.


Using MAM

Introduction
Mark's Adding Machine (MAM) was designed with the idea of ease of use in mind. Those with experience using adding machines will likely find the transition to MAM simple and straight forward when it comes to the basic features. Some of the more advanced features will be best mastered after a thorough reading of this topic. The core functions of the program will generally mimic those of a typical adding machine, with a few minor differences. I will begin with a discussion of some of the differences between MAM and a 'real' adding machine. Thereafter, I will cover the usage of most of the features of MAM, including basic operations, tape box features, spreadsheet integration, and macro keys. Examples and screen shots will be included where appropriate.

Memory LED
The first difference most users will notice is that MAM features not one (1) but two (2) LED indicators along the top of the screen. The one to the right represents the familiar LED readout, whereas the one on the left is one that you have probably never seen on an actual adding machine. (I never have.) This LED is a Memory LED which, appropriately enough, displays the contents of the current running Memory total.

Usage of the * key for Multiplication
Another difference you might notice is the use of the * key. On most adding machines, the * key represents the Total key. However, since the * key is used as a Multiplication key on most calculator programs for the computer, (case in point: the calculator that ships with Windows) a design choice had to be made. I chose to use the * key for Multiplication operations and the T key as a Total key. (The X will be used to denote the multiplication key in this help file.)

Using MAM
In using MAM, you have to keep in mind the concept of a running total. Some operations will impact this total, either by adding to it or subtracting from it. Other operations will not affect the current running total at all. Some users might be surprised to learn that a multiplication or division operation does not automatically affect the current running total. For example, entering
12 X
5 =

will result in 60 being displayed in the LED. However, the value of 60 is not added to the current running total. To add 60 to the current running total, enter
12 X
5 +

instead of
12 X 
5 =


Generally speaking, to add or subtract to or from the current running total, you must use the Plus or Minus keys following the multiplication or division operation.

Of Dogs and Fortunes
Here's an example: Suppose you wish to calculate how much money you made this week in your dog breeding business. You sold 5 puppies for $50.00 each. You also sold an adult female for $150.00. Before you sold the puppies, each one had to be given a vaccination for rabies, which cost $2.50 each. You also spent $25.00 on dog food this week.

To calculate your vast fortune, you would enter the following:
5 X
50 +
150 +
5 X
2.50 -
25 -
T

Here is an actual screen dump from using the above calculations, together with some comments that I added to it (with Decimal Precision set to 2):



The first thing you will notice is how the comments make it so much easier to understand what the numbers in the tape box mean. This ease of reading can be very important when you are presenting the information to another person or trying to decipher them yourself on a later date, such as tax time. For example, suppose you were managing the dog business for the owner. It would be much easier to make him/her understand how you ended up with only $362.50 in profits for the week rather than $400.00 ($150.00 + $250.00 = $400.00). With MAM, you are more easily able to show the owner that you had to spend $25.00 on dog food and $12.50 on vaccination shots. I can't emphasize enough the value of MAM as a communications tool and not just a calculator.

Notice that MAM automatically generates a comment whenever the Total button is pressed, informing the user of the total number of items that were added/subtracted, further breaking this down into the number of positive and negative items. There were 4 items in the above example: 1) The sale of the 5 puppies, 2) the sale of the adult female, 3) the cost of the 5 vaccination shots, and 4) the $25 spent on dog food. Of these 4 items, 2 were positive (the sale of the puppies and the sale of the adult female) and 2 were negative (the $12.50 on shots and the $25 on dog food). This feature provides a handy method of verifying that the correct amount of items have been entered. The Total button (T) will cause the running total to be cleared. This is in line with the way desktop adding machines work. If you don't want to clear the current running total, use the Subtotal button instead.

Spreadsheet Integration

MAM supports spreadsheet integration via the Windows clipboard. By pressing CTRL + C, or choosing the Copy to Clipboard item in the Edit menu, the contents of the tape box are sent to the clipboard in ASCII spreadsheet format. The clipboard contents can then be pasted into a Windows spreadsheet program, such as Excel or Works, by pressing CTRL + V from within the said spreadsheet program. Be sure to use cell A1 as the insertion point for your paste operation!

Once you have pasted the information into the spreadsheet, you can manipulate the values and the spreadsheet will be automatically recalculated to reflect your changes. Be careful using this feature, verifying for yourself each time that the formula is being recalculated in the manner you are expecting! This is especially true when using the Macro Keys (discussed below) since Macro Keys are always interpreted as immediate values rather than formula-based values. In other words, when MAM sets up the worksheet formulas, it assumes that all lines were entered manually without the use of macros.

One more thing. Some spreadsheet programs, notably Microsoft Works v4.0, will interpret the pasted data as labels, rather than formulas, and will prepend a double quotation mark to the beginning of each. This is not a bug in MAM, but rather is a result of the lack of sophistication of MS Works. (Excel does not suffer from this issue.) A simple work-around is to use the Replace item in the Edit menu to globally replace all instances of Double Quote Equals (''=) with Equals (=). This will cause the spreadsheet program to re-interpret the formulas as formulas instead of as mere text labels.

Of MUD and Widgets

The MUD key is represented on many adding machines as MU&MD. It is used to calculate Mark Ups and Mark Downs. To illustrate, let's suppose you are in the business of buying and re-selling widgets. Each widget costs you $75.00. How much would you have to sell each widget for if you wanted 25% of the selling price to be profit? (This would be considered a 25% profit rate.)

To calculate this you would enter:

75 X
25 MUD


Here is a cutout of the resulting tape box screen dump:



As you can see, MAM calculates 2 things for you: 1) The Mark Up in $, and 2) the final Selling Price in $. Note also that MAM generates all of the comments you see on the lines. Nothing is added to or subtracted from the current running total.

The MUD button can also be used to calculate Mark Downs. To calculate a Mark Down, you must use the division key instead of the multiplication key to set up the operation. Thus, to calculate a 15% loss rate where each widget costs $150.00, you would enter:

150 /
15 MUD


Here, again, is a cutout of the resulting tape box screen dump:



Note: This functionality is derived from the MU&MD key found on some Canon and Casio adding machines. It does not exhibit the same behavior as the MU key found on other machines. Make sure you fully understand the proper usage of this button! The mark up or mark down is based upon the final selling price, rather than the seller's cost for the item.

Percentages (%)

Let us suppose you work for the corporate giant Widget Corporation. As an employee, the Widget Corporation offers you the opportunity to invest in its stock through payroll deductions with no broker fees. For every dollar of stock you buy, up to $1,800.00 per year, the Widget Corporation will match 15% of that amount. You can buy more than $1,800.00 per year, but you will not receive the matching 15% for any amount you invest that is in excess of the $1,800.00 figure. Now, let's suppose you choose to deduct $50.00 from each week's paycheck for stock purchases. How much would be your total yearly investment contribution? How much will the Widget Corporation contribute? What will then be your total investment in Widget stock?

In this example we will also be using the Memory keys M+=, M-=, and MR (Memory Recall):

52 X
50 M+=          (Adds the product of 52 and 50 to the Memory Total)
1800 M-=        (Subtracts 1800 from the Memory Total)
MR +            (Displays Memory Total, and adds to current running total)
1800 +          (Adds 1800 to running total)
15 % +          (Adds 15 % of 1800 [$270.00] to the current running total)
Total           (Displays total and clears it)


Here is the screen dump of the tape box, together with a few added comments:



You will note that the figure of 15% does not itself appear in the tape box. MAM replaces the figure of 15% with the actual value of $270.00 and inserts a comment on that line to indicate what has happened: ;<% key> (15.00% of 1800.00). This deviates from the way most adding machines implement the percent key function and is more in line with the way the typical hand-held calculator works. I decided to implement the percent key in this fashion because I thought it was the better way to do it.

Tip: The comments added to lines containing the percent button are used by MAM as a tag for the purposes of tape box re-calculation and spreadsheet integration features. For that reason, the comments cannot be modified by the user. You can, however, insert a blank line above and/or below and add your comments to the <comment> line.

What if...

Lines in the tape box can be edited after entry by double-clicking on them. The tape box will then be automatically recalculated to reflect the changes, if any, that you made to the double-clicked line. This can be a very powerful feature, enabling 'what if' scenarios, but can lead to unexpected results if you're not careful how you set up your tape box! This is especially true where macros (discussed below) have been used in the creation of the tape box since MAM does not replay macros during recalculation, but instead, replays the buttons that the macros were expanded to when they were used. In this particular example, you can easily figure out how much your investment would be if you chose to have, say $65 withheld from each check. To see this in action, double-click on the line that says 50.00 =. Then enter 65 in place of the 50.00 and press the OK button. This all works fine as long as the amount you contribute on a yearly basis is in excess of the company match maximum. If the amount falls short of this maximum, however, the formula needs to be re-worked. This is a good example of what I mean when I say you have to be careful and watch what you are doing!

Lawyers, guns, and money

For this next example, let us assume you are a legal secretary. You are given the task of calculating an attorney's bill to his client for services rendered. The attorney in question charges $100.00 per hour. On May 1, 1998, the attorney spent 4 hours working on the client's case. On May 3, 1998, 3 1/2 hours were spent. On May 4, 1998, 2 hours were spent on this client's case. On May 9, 1998, 32 copies were made at a charge of $0.25 per copy. On May 9, 1998, court charges of $138.50 were incurred for the filing of papers.

To calculate the bill:

4 X
100 +
3.5 X
100 +
2 X
100 +
32 X
.25 +
138.50 +
Total


Here's what a screen dump of the calculations would look like:



This screen dump was from the Print Preview screen. Compare this to how this would look without the comments if it were done using a standard desktop adding machine and decide for yourself which one would be easier for the client to understand.

Macros

You will notice in the above example that some of the same keystrokes were entered over and over again (I'm speaking of X 100 +). It can be safely assumed that in the typical day in the life of our fictional legal secretary, he/she will be entering these keys many times over in calculating clients' bills. To the rescue come the Macro Keys. To illustrate, let us record a macro to Macro key number 3 (M3): First, right click on M3 (or just about anywhere on the calculator) and choose the Record a Macro menu item. Press OK to clear the message box that pops up, then press the M3 key. You will see the M3 key's text change to M3* to indicate that it is in macro recording mode. Now enter X 100 +, followed by the M3 key. To verify that the macro is what we intend for it to be, let's pull up the macro edit facility and take a gander. To do this, select the Edit Macros menu item from the Macros menu. This will bring up the edit macros dialog box. Locate the Active Macro Box in the upper right hand corner of the dialog and select Macro3 with your left mouse button. The Macro List Box on the left-hand side of the dialog will now contain the macro listing for Macro3.

If this doesn't contain:


X
1
0
0
+

you have done something wrong. Start over and try again. Now, with the macro in place, here's how the above calculation might have been entered:

4 M3
3.5 M3
2 M3
32 X
.25 +
138.50 +
T


The macros work by simply inserting keystrokes in place of the macros as they are encountered. Macros are expanded in place as they are used. That is, whenever our secretary enters M3, the computer translates this into X 100 +. The only time macros are expanded is at the time they are first used. Once the macro has been expanded, MAM forever after treats the document data as though it had been manually entered without using macros.

Now, let's suppose our secretary has entered the above data only to find out that on May 1, 1998, the attorney had stayed 2 hours later that evening working on the client's case. This means he spent 6 hours rather than 4 hours on that date. If this had been done on a regular adding machine, our poor secretary would have to re-enter all the data all over again if he/she wanted to have it all on the same tape printout. With MAM, it's a snap to just go in and edit the one line that needs to be changed and reprint the tape.

If a line in the tape box is edited, the entire tape box is re-calculated. Any remaining lines that were dependent upon the value entered in the edited line will be automatically adjusted just as if the edited value had been originally used. MAM performs this re-calculation by simulating a re-typing of the tape box entries using the expanded macros just as if the user had cleared the tape box with the CA button and re-entered the calculations all by hand WITHOUT USING MACROS. To illustrate this behavior, go to the File menu, choose the Open item and select a file called 'LawyerExample.mam', which was installed if you chose to install the sample files during your installation. If you don't have the file, you can create it by recording the macro as described above and entering the data using that macro. Now that you have the file either loaded or entered, double click on the line in the tape box that says

4.00 X.

This brings up the Edit Tape Box Entry dialog. You will notice that the 4 is already highlighted for you, so all you have to do is type in the number 6 and press the Enter key. (In this particular example, you'll also want to edit the comment for this tape box line to show that 6 hours were spent and not 4.) Now, click OK or just hit Enter and the dialog will be closed, bringing you back to the main form view. There you will see that the tape box has been re-calculated for you.

Now to illustrate what I mean when I say that the computer re-calculates by using the expanded macro definition rather than calling the macro again, let's redefine Macro 3 and re-calculate the tape box. To do this, choose the Start Recording item in the Macros menu, click OK to clear the message box that pops up, then click the M3 button to begin recording. Now, enter

X 150 + (in place of the X 100 + that was the previous macro definition)


and click the M3 key again to signify that we are finished recording the macro. Go back and double-click on the line in the tape box that formerly said

4.00 X

and change the value (which might be 6 if you've been playing along at home) to 5. Click OK and watch what happens back in the tape box. Did you expect the tape box to be re-calculated using $100 per hour or $150 per hour? This is what I mean when I say the tape box is re-calculated with the expanded macro definition, rather than by replaying the macro. Macros and documents are independent of each other. That is to say, the macro definitions that were in effect when the tape box was first created might not be (and probably won't be in many cases) the same definitions in effect later on when the tape box is re-calculated. This doesn't matter because the computer basically ignores the macro definitions when it performs its re-calculations and uses whatever values the macros expanded to when they were originally used. (This is by design since I wanted macro files and document files to maintain total independence from each other.)

If you wanted to be able to use a replaceable value for the amount charged per the hour in the above example, you would set up your tape box using the MR key. First, put the amount per hour into the Memory LED, then refer to this value with the MR key where needed. Instead of defining the M3 macro above as

X 100 +

we could have used

X MR +

instead. Thus, the tape box entry for the lawyer's bill could have been entered as follows:
MT         (ensure that we start off with the memory register cleared)
100 M+=    (to get 100 into the memory register)
4 M3
3.5 M3
2 M3
32 X
.25 +
138.50 +
T


Now, with the tape box setup with the MR key, you have a replaceable parameter everywhere it is used. Then, if the lawyer decides he wants to charge $150 per hour, all the secretary has to do is go in and change the one line in the tape box where the 100 M+= was entered to 150 M+=. Note: This MR functionality is preserved through spreadsheet integration. That is, changing the cell in the worksheet where the 100 M+= is located will cause the other references to the MR key to be replaced as well. This is because whenever the MR key is encountered during a copy to clipboard operation, MAM inserts a formula that references the value currently in the memory register, rather than the immediate value of whatever happens to be there at the time the copy to clipboard operation is performed. In this particular example, all occurrences of the MR key will be translated into a formula referencing a single cell, the one where the 100 M+= is located. However, in most cases, the memory register is being dynamically altered unlike here where it remains constant throughout the life of the document. In such cases, each invocation of the MR key in the spreadsheet might have a different formula associated with it. Don't worry, MAM will keep track of all this for you.

Unlike the MR key, macros cannot serve as replaceable parameters during spreadsheet integration or tape box re-calculations.

Advanced Macro Uses

There are times when you will want to create and use a macro to perform a calculation. Generally speaking, if you can come up with an algebraic formula to represent a problem, (and there aren't too many variables) you can set up a macro to do the figuring for you. For this example, let's suppose it is your job to calculate the areas of circles all day long for a giant clock manufacturer. (OK, maybe I'm reaching a little on this one. Work with me. ;). The formula for determining the area of a circle is Pi X r-squared, where Pi is 3.1415926535, and r is the radius of the circle. Further, let's suppose that you are not given the radius. Instead, you are only given the diameter. You can easily deduce the radius by dividing the diameter by 2. Without further ado, let's take Macro key 0 (M0) and create a macro for it to solve for the area of a circle. Right click on M0 (or just about anywhere on the calculator) and choose Clear All Macrosfrom the pop up context menu. Now, click on the M0 key and choose YES to begin recording a macro to this key. (If you have some nifty macro you've defined, you'll want to export it to a file so that you can import it later.) Youwill notice that the text of the key has changed to M0* just like before to indicate that we are in macro recording mode. Now, enter the following keys in the following order:

MT       (clears the memory register because we will be using the MR key)
T        (clears the current running total)
V        ('V' key allows users to pass a parameter to our macros, the diameter of the circle in this case)
/
2        (divide diameter by 2 to get the radius)
M+=      (store the radius in the memory register so we can refer to it with MR)
MR       (Area = pi X r squared = pi X r X r)
X
MR       (square the radius by multiplying it by itself)
X
3.1415926535 (pi)
+        (displays the result of r X r X pi and adds it to the current running total)
T
M0       (takes us back out of macro recording mode)


Now that our macro is recorded, we can determine the area of a circle with a diameter of 42.5 by entering:

42.5 M0.

The first two (2) lines in our macro, MT and T, simply clear the current running total and current memory totals. The V key is interesting. What it does is tells the computer to substitute the value that was in the Main LED at the time the M0 macro was invoked. In programming parlance, this is similar to passing a parameter to a function. In this case, 42.5 is the parameter. Pretty cool, huh? How we macro writers interpret the parameter is up to us. In this example, we interpret the passed parameter as the diameter of the circle. We divide this diameter by 2 to get the radius and add this product to the current running Memory Total with the M+= button. The reason we use the Memory here is so we can use MR to access this information in a replaceable fashion. That is, we can copy this output to a spreadsheet and/or we can double-click on the line containing 42.5 / and replace this value (42.5) and have the computer automatically recalculate the final total for us.

For the life of the macro call, the 'V' key remains a constant, unchanging value, which is whatever happened to be in the Main LED at the moment the macro was first invoked. Each macro key has a separate 'V' key associated with it. So that, if one macro is called from another macro, the called macro's 'V' key will contain whatever value was in the Main LED when it was called by the calling macro. During tape box re-calculations and spreadsheet integration, the fact that a tape box line was derived from a 'V' key reference is ignored. In such cases, the tape box line is treated just as though the user had entered the value directly without using a macro. If you use multiple 'V' key references within your macro definition, you will have to go in and manually edit each tape box line containing the 'V' key references!

Even More Advanced Macro Uses
We could have defined the above example macro as follows:

MT       (clear memory total)
T        (clear current running total)
V        ('V' key holds diameter, passed in by user)
/
2        (convert diameter to radius)
=        (puts result of V/2 into Main LED, but does not affect current running total)
QR       (QR means quick record and will be explained below)
M1       (QR M1 sequence stores the radius into M1 in a NON-REPLACEABLE fashion)
3.1415926535
QR
M2       (store the value of pi into M2)
M1       (at this point M1 = radius and M2 = pi)
X
M1
X
M2
+        (adds the result of M1 X M1 X M2 to the current running total)
T

This works just fine, except that we have given up our ability to have the computer automatically recalculate for us when we go in and manually edit the line in the tape box containing the diameter, in this example 42.5. This is because MAM expands macro key definitions ONLY at the point they are originally used. Later, when we manually edit the line containing 42.5 (or whatever we entered as our diameter), the computer performs the recalculations with the expanded macro definitions rather than the macro keys themselves. The moral: Be extremely careful when using macro keys in hand with spreadsheet integration or manual line edit recalculations to be sure that the results you are getting are what you are expecting. It is best to think of macros as mere conveniences to save you a few keystrokes. Once a macro is finished playing, the result is identical to what it would have been had you not used a macro at all, but instead had typed all the entries in manually. As a general rule of thumb, if you use QR during a macro call or multiple instances of the 'V' key reference, your macro will not be suitable for automatic re-calculations or spreadsheet integrations.

Okay, now for an explanation of the QR key. The QR key means Quick Record. It is used to Quick Record a macro on-the-fly, so to speak. This can be a very powerful use of macro keys since it allows them to be used as dynamic memory storage areas. Anytime you press QR followed by a Macro key, the pressed Macro key will then contain whatever value was in the Main LED at the time the Macro key was pressed (or invoked during the playing of another macro). Further, there's nothing stopping you from redefining the same macro key later on within the same macro.

Tip: If you would like to store the Memory LED contents into a QR macro, multiply the MR key times 1, then QR and the macro key to which you would like to store the value. For example:

. . .		(macro definitions)
MR X
1 =		(copies the memory contents to the Main LED, but does not affect the current running total)
QR
M3


The QR key provides a quick and easy way to Quick Record a value to a macro key. The QR key can be used both within a macro definition (as in the above example) and outside a macro definition. The difference is a matter of scope (lifetime) of the macro definition. If a Quick Macro is recorded in immediate mode, the macro key will retain its definition until some other definition is recorded over it. However, when a Quick Macro is created within another macro (as above), the macro goes out of scope as soon as the creating macro finishes playing. At the point a macro finishes playing, any QR macros that it recorded are emptied. This is by design. The reason for this will be seen shortly when we begin our discussion of Macro Prompts. Suffice it to say that there may be instances where a macro might be called several times during a MAM session and each invocation of the macro might be dependent upon one or more of the other macro keys to be empty. A QR macro that was recorded during the playing of another macro is guaranteed to be empty after the invoking macro is finished playing, regardless of whatever definition the QR macro might have contained prior thereto.

Be especially careful when using the QR feature to dynamically values to macro keys. If you go in and edit a tape box line and re-calculate, you might not get the results you were expecting to get. This is because the macro keys will NOT be treated as dynamic variables during the re-calculation. Instead, they will be treated as static immediate entries, just as though macros had never been used. I know I keep repeating myself on this, but it is VERY important that everyone understand: ONCE A MACRO HAS FINISHED PLAYING, FOR ALL PURPOSES, THE RESULTS ARE THE SAME AS IF THE USER HAD MANUALLY ENTERED THE DATA WITHOUT USING MACROS AT ALL.

Insanely Advanced Macro Concepts

Perhaps the most powerful use of macro keys is empty macro definitions! This is because when an empty macro key is invoked from a playing macro, the user is prompted to enter a value. This is done by associating each macro key with a prompt string in the Macro Editing Dialog Box. To illustrate this concept, let's import a macro file named AreaOfACylinder.mcr, which is a sample macro file included with MAM. First, clear all macro definitions with the Clear All Macros menu item in the Macros menu. Then, select Import a Macro from the Macros menu. Locate the file named AreaOfACylinder.mcr and open it. Now, upon pressing the M0 key, you will be prompted to enter two (2) values, one for the diameter of the cylinder and the other for the height of the cylinder. Try it and see! To see how this works, go to the Edit Macros Dialog and click on the various items in the Active Macro List Box. You can see that each Macro key has a different prompt and a different default associated with it. Click on Macro0 in the Active Macro List Box to see the definition for Macro 0. Here is the listing for the M0 macro:

C           (initialize current running total to 0)
MT          (initialize current memory total to 0)
Macro1      (Macro1 is empty, so the user is prompted to enter the diameter)
QR          (take the value the user entered and store it as a quick macro into Macro 1)
Macro1
Macro2      (Macro2 is empty, so the user will be prompted to enter the height)
QR          (quick record the entered value into Macro2)
Macro2
Macro1      (user is not prompted since Macro1 is no longer empty))
/           (convert diameter to radius)
2
M+=         (store radius in memory register so we can access it with MR)
MR          (Area = pi X r X r X height)
X
MR
X
3.1415926535
X
Macro 2     (user is not prompted this time because Macro2 is not empty)
+
Ttl
Macro 3     (empty macro used solely to send a message to the user)


The final line of the macro is a call to Macro 3, which is an empty macro. The call to Macro 3 is solely to send a message to the user of the macro. Any value entered by the user is ignored. In fact, the default value in the prompt box tells the user to just hit the OK button. This provides a useful mechanism for educating your users on how to use your macro even if you don't necessarily need them to enter a value at that point.

Note: the sequence Mx QR Mx, where x is 0, 1, 2, or 3 for M0, M1, M2, or M3 respectively, and where Mx contains an empty macro definition, the first call to Mx causes the user to be prompted to enter a value. Then, QR Mx causes the user's value to be stored into Mx, making it no longer an empty macro. Thus, when Mx is next called, it produces the value that the user previously entered, without further prompting. It is not at all necessary to store the value in the Macro key unless you want to use that value later on in the macro. Instead, you can simply use the value entered immediately. Doing so will leave the Macro Key empty so that its prompting capability can be re-used in the same macro as many times as needed. Of course, you will want to create a generic enough prompt that will be suitable for each call, such as Enter a value since there is no way to change the prompts during the playing of the macro.

Within the Edit Macros Dialog you will see two (2) edit controls across the bottom of the screen. One is for the prompt associated with each macro. The other is for the default value to use for the user's entry. This value can be any string or number as you saw with the AreaOfACylinder macro. You can even use it just to provide information to the user and ignore whatever the user enters when prompted. If you do this, you should set the default value to something like 'Hit OK to Continue', to avoid confusing the macro user.

All buttons on the screen are available for inclusion in macro definitions, except the same macro key that is being defined, since pressing it will be interpreted to mean that you are finished recording the macro for that key. From within the macro editing dialog, you can insert a macro key into itself, but the computer will catch the error when you try to play the macro. Otherwise, a self-referential macro would put MAM into an infinite loop, which is probably not what you intended to do. Two or more macros referencing each other is another form of strange loop that could potentially send MAM into Never Never land. Fortunately, MAM is smart enough to catch such errors while the macros are attempted to be played. MAM does this by keeping track of which macros are being played at any given time. If there is an attempt to call a macro that is already being played, an error message 'Skipping recursive macro call' is shown and the offending call is ignored.

You can include the pound (#) button within a macro definition, too. Whenever the # button is encountered in a macro definition, the user is prompted to enter a comment for the line. Judicious use of the # button is a good idea to force yourself to document your work as you go. (However, it can be annoying if others are using your macros and they are not as diligent about commenting their documents as you are.) We are living in the Information Age. More than ever before, communication skills are critical. If used correctly, MAM can be an effective communications tool.