MyCalculator (brilliant name, huh?) is intended as a relatively simple postfix (i.e. reverse-polish notation or RPN) calculator for the Newton MessagePad. MyCalculator has not been thoroughly tested. I do not promise that it behaves correctly. Use it at your own risk. If you are calculating something important, double-check your results with some other variety of calculation. No warranties are expressed or implied. Its use should be relatively obvious to people who have used postfix calculators in the past. In essence, instead of keying 2 + 3 = one keys 2 enter 3 + The operators work on the x and (in the case of operators that take two arguments) y registers and place their results in the x register. Those registers and two more make the stack, which can be used for holding intermediate results. That is, where one might key 2 * 3 * 4 = into an ordinary (infix or algebraic) calculator, one keys into this calculator either 2 enter 3 * 4 * or 2 enter 3 enter * * The screen shows whether the calculator is in degrees or radians mode at the upper right; a history of your last 20 calculations at the top center (use the universal scroll arrows to scroll back through it); the stack in the upper left; and a set of four memory registers in the upper right, in addition to the calculator's "keys". Numbers are restricted to six digits after the decimal point, mostly so that they'll fit on the screen. The use of the number and operator keys should be pretty obvious since all of the stack is visible on the screen. There are various other keys including the standard trig functions (sin, cos, tan, asin, pi, etc.) and some that can perhaps use some explanation since I wrote MyCalculator to behave in the way I think a calculator should and other folks may not find that intuitive: en enter xy swap contents of the x and y registers of the stack rd roll the contents of the stack down one register (the contents of the x register falls off the bottom) dr toggle between degrees and radians mode bs backspace one character if you're keying numbers or clear the x register if you're not c clear the x register ca clear all int put the integer part of the x register into the x register fpt put the fractional part of the x register into the x register; about the same as: enter int - +- toggle x register's sign sto put the contents of the x register into the memory register that's selected by the radio button to its left In addition, tapping one of the memory registers copies its contents (or 0 if it's empty) into the x register. (That's why there's no rcl.) You can enter numbers either by tapping the calculator's "keys" or by writing numbers into the x register. MyCalculator is ) 1993 Matthew Dixon Cowles. MyCalculator is free. Please play with it, give it away, investigate the source code if you have any interest, and use ideas and code fragments from it in your own projects. The only limitations on its distribution are that if it is distributed substantially complete it must be distributed for free and my copyright message and warning message about not being certain that it works properly must remain intact. People are encouraged to use ideas derived from it and reasonable portions of the code without restriction. MyCalculator was my first Newton project and therefore the code leaves quite a lot to be desired both in terms of prettiness and in terms of efficiency. If enough (any?) interest is shown, I'll clean it up some and maybe add some stuff. Mostly just to see how you'd do it, the x register is not based on a protoInputLine. Instead it's based on a clView so that I can handle deciding which of the recognition possibilities the Newton offers is best. For this project, the choice made is just the first one that's all numbers. There is actually some advantage gained here because if you set a protoInputLine to accept only numbers, it will accept numbers with spaces in them, which is fine for lots of purposes, but not for this calculator. The viewWordScript for the x register filters out any spaces that the recognizer has put in your numbers. As other folks have mentioned, giving the package an icon on the Newton is done by firing up ResEdit, creating an ICON, copying the ICON to a PICT resource, naming the PICT resource, saving the file, quitting ResEdit and adding the resource file to the project. Then the icon's name will be available in the toolkit's settings dialog box. I believe that everything above is true, but I could readily be wrong about anything. Please make bug reports, suggestions, expressions of praise, and lucrative job offers to AppleLink address MONDO. I hope that you find MyCalculator interesting and/or useful. Newton, MessagePad, and ResEdit are trademarks of Apple Computer, Inc in case anyone was wondering. --Matt