Make your own free website on

PCalc Version 1.0.2 of March 1993

Designed and coded by James Thomson. A TLA Systems production.

* Overview:

PCalc is a neat simulation of a programmable scientific calculator.

Please note that it *requires* System 7.x.x.
If you use System 6.0.x or earlier, here is what you are missing:

Programmable functions via a simple mini language.
System 7.x.x savvy:
Can be controlled & programmed via Apple Events.
Balloon Help for every button, menu & dialog item.
Resolves Aliases.
32-bit clean.
Multifinder aware.
Large 16+3 digit display.
Hierarchical menu of user functions.
Includes many functions for converting between different weights and measures.
Quick, one click, conversion between decimal, hexadecimal and binary numbers.
AND, OR, NOT, XOR, ROL, ROR and other extra functions in hex and binary mode.
30 named user constants, 10 for each mode.
'Undo' of any action.
'Minimize' button to shrink the calculator when not in use.
Enhanced graphics when viewed on a 256 colour or 16 grayscale (or better) screen.
Colour graphics and help screens are stored in separate plug-in extensions.
Runs on any Mac with System 7.x.x or greater, with or without Color Quickdraw.

And of course it's freeware - totally guilt-free software. Guilt-freeware if you like. If you really like it, send me a postcard. I'd rather release it as freeware than make it shareware and not hear anything back at all. If you are an influential person in a big company, think of this as a job application! To tell the truth, I have a year and a bit left of my course at university, but it can't hurt to look for something now. Having said that, if you work for Apple, I'll be on the next plane out...

If you aren't an influential person, but know of one, give them a copy!

* Installing PCalc:

The 'PCalc Functions' file (*) should be in the same folder as the PCalc application. If you are running it on a colour screen, the 'PCalc Colour Extension' (*) should be there too. And if you need the balloon help and quick reference screens, the 'PCalc Help Extension' (*) should also be in the same folder. (* or an alias of it)

If you are only going to run PCalc on a 1-bit screen, you don't need the colour extension present (it won't be used even if it is) and you can also reduce the memory PCalc uses to 128k from the 'Get Info' window. If you are only going to run PCalc on an 8-bit screen, you can reduce the memory requirements to 256k.

Make an alias of the main application and place it in the 'Apple Menu Items' folder inside the System Folder if you wish. Even better, put an alias in the 'Startup Items' folder and have the calculator always on hand. You may want to set the 'Minimize on Startup' option in the preferences dialog and 'Minimize on Context Switch' too in that case.

* The Basics:

I'm assuming you've used a calculator before. If so, it should all be fairly intuative. Remember that everything has balloon help, so if you don't know what a particular button does, you can find out easily. The help screens accessed from the Help menu will give you some more clues. I really hate writing manuals, so I tried to make everything as obvious as possible so I wouldn't need to. I adhere to most of the Mac interface guidelines (the sensible ones anyway ;-) so you should cope.

* Writing Your Own Functions:

The Functions menu is defined entirely in the 'PCalc Functions' file - which is just a plain text file. Open it up with your favourite text-editor and take a look. The file also describes the language used to write functions. As with the AppleEvent support, you don't have to know anything about this to use the calculator but it's there under the surface if you are interested. Quite a few functions are already defined for you and they might be all you need.

* Apple Events:

The events PCalc accepts were originally just hooks left in the program so I could add on a function editing program later - this is still a possibility. However, they also will be of use to those of you with something like QuicKeys with its AE extension, or Frontier, or even AppleScript if it ever shows up. If some nice person at Apple would send me the AppleScript Beta CD, I'll make all this clearer.

CLASS: ID: Name:

'aevt' 'OAPP' Open Application
Sets up PCalc on opening

'aevt' 'ODOC' Open Document
Does nothing, but included anyway

'aevt' 'PDOC' Print Document
Again, does nothing

'aevt' 'QUIT' Quit Application
Quits PCalc

'p©al' 'p©GX' GetXRegister
Returns text of the displayed value

'p©al' 'p©GY' GetYRegister
Returns text of the second memory

'p©al' 'p©GM' GetMemory
Returns text of the memory

'p©al' 'p©SX' SetXRegister
Sets display to text value in p©TX parameter

'p©al' 'p©SY' SetYRegister
Sets second memory to text value in p©TX parameter

'p©al' 'p©SM' SetMemory
Sets memory to text value in p©TX parameter

'p©al' 'p©MD' DecimalMode
Change mode to decimal

'p©al' 'p©MH' HexadecimalMode
Change mode to hexadecimal

'p©al' 'p©MB' BinaryMode
Change mode to binary

'p©al' 'p©UD' UseDegrees
Measure angles in degrees

'p©al' 'p©UR' UseRadians
Measure angles in radians

'p©al' 'p©CS' ChangeSize
Maximizes or minimizes the calculator

'p©al' 'p©LF' LoadFunctions
Loads the 'PCalc Functions' file into PCalc

'p©al' 'p©AN' ApplyNamedFunction
Applies the function with name stored in the p©TX parameter

'p©al' 'p©AG' ApplyGivenFunction
Applies the function stored in p©TX parameter

* Virus Checking:

Until I come up with an idiot proof checksum routine that is idiot program proof, I have disabled the virus protection in the shipping version of PCalc. If this is something you can't live without, get in touch and I'll tell you how to re-enable it. Too many people had problems with the virus alarms going off for legitimate reasons (and AutoDoubler 2.0...). Install the latest version of Gatekeeper on your mac and check your files out with the latest version of Disinfectant. You know it makes sense.

* Version Info:

1.0.2 - This version mildly corrects the display bugs. PCalc should now run without a graphical hitch on single-screen macs. Unfortunately, the downside is that PCalc now requires 512k to run on a 24-bit colour display, rather than 256k as before. Also, as requested by a number of European users of PCalc, the ',' key now works as a decimal separator. And, as noted above, the virus checking code has been disabled.

(More importantly, there are a ton of new easter eggs :-)

I decided to release this with just bug fixes *now*, rather than in a few months with cool new features, so I could get a stable version floating around.

And I got my developer CDs! If you've got a CD-ROM drive and are even considering programming the mac, get a subscription to d e v e l o p from the nice folk at APDA.

1.0.1 - Okay, okay, there *was* a bug. The Constants menu didn't actually work properly. I removed one tiny line of code that wasn't doing anything before I released version 1.0. Guess what? It did do something!

Thanks to Robert Baumel ( for more accurate and up to date values for the constants and conversions - next time I won't get them from ancient engineering texts. Thanks also to him for finding the bug with the Constants menu (which pointed me to a similar bug that no-one has noticed so far with the
Functions menu).

Still haven't got my developer CDs...

1.0 - First public release following several not widely travelled beta releases. No one has found any new bugs for a while so here it is!

* Bugs, Features & Forthcoming Events:

The multiple-monitor bug has been confirmed, if not actually fixed (yet). If you have problems, keep the calculator on your main screen for now.

A 'print-out tape' window will be added soon(ish), keeping a track of your calculations.

The error handling is still a bit shakey. If something bad happens during the execution of a function, the calculator beeps but that's about it. If there is a syntax error in any of the functions... well, let's hope there aren't any syntax errors for now. The 'language' is probably the first thing for major overhaul in the next version. A more useful real language will probably be introduced with a stack and possibly even some flow control. Suggestions are welcome!

The Hex mode will get the ROL, ROR etc buttons since I found a need for them myself recently. Also, I have six buttons free in the hex and binary modes which are crying out for some useful functions but I can't think of any right now. Can anyone think of some useful hex and binary constants? Please?

It's not really PowerBook friendly since it accesses the hard-drive a lot to save memory. An option to hold all the code in memory at once at the expense of a higher memory requirement is possible but I am told that this isn't really a problem, so unless someone really wants this, it won't be implemented . Still waiting for people to vote on this one!

The AppleEvent support will become a bit more standard. I know there are standard events for getting and putting data but since Apple haven't shipped my developer CDs yet, I don't know what they are. So non-standard events it is for now. There isn't an 'aete' resource yet either. But still, you can so some real cool things using QuicKeys with PCalc now like macros that convert the selected number in your editor into hex and back, or total a list of numbers and type the result at the bottom. I hope to expand on this and make PCalc a sort of math-server. Hopefully this will form the basis of a project at Uni next year - PCalc GX anyone?

UPDATE - OK, I've got the developer CDs now - I just haven't had time to overhaul the AppleEvent stuff yet. I'm going to do it at the same time as I add AppleScript support.

The major forthcoming event is my third-year degree exams, so work on PCalc will slow down to just bug-fixes until after that. If you want to see work continue on PCalc 24 hours a day, employ me to do it!

* About the Author:

The author is studying computing science at Glasgow University in the UK. He would like to hear from potential employers in the computing industry with a view to entering the 'real world'. Contact him at via internet email at or via 'real' mail at

James Thomson,
25 Dumbreck Road,
The UK,
G41 5LJ.

If you have any feedback on this calculator, do get in touch as well... Any cunning ideas have a pretty good chance of making it into the next version. Perhaps I should clarify that a little bit - any cunning ideas have a pretty good change of making it into the next *major* version - i.e. PCalc 2.0 or 1.5 or whatever the in-vogue version number for big upgrades is when I get round to doing it!

* Legal Blurb

If you use this calculator to design a bridge and the bridge falls down because of bugs in my code, tough - this is freeware and you are accepting all responsibility by using it. You will get my sympathy, but not my money. Read my lips, no new warranty!

I also retain all rights to PCalc. It may be freely distributed but it is copyright and not in the public domain. You may not distribute it for profit. Give copies to your friends, post it on your local BBS, but don't sell it. I also don't want to see it turning up in a 'for-profit' shareware library ie EDUC*RP, although user-groups such as BMUG or the UK MUG are to be encouraged to distribute it. I especially do not want to see it turning up on a CD-ROM collection (since most of the collections I have seen have been of dubious quality) or on the cover of a magazine unexpectedly (as I believe happened to the author of Apollo, Jeremy Rousak). The few exceptions to this are the Info-Mac CD-ROM since they seem to have the decency to ask authors for permission and give you a free CD for your troubles and the BMUG CD-ROM (if they send me a copy too). If you are in any doubts, ask my permission.

Permission was granted to the Arizona Mac User Group to include a copy on their 'BBS in a Box' CD-ROM.

Finally, please do not distribute modified versions of the program or other files at all.
This also applies to Robert, just in case it wasn't clear previously ;-).

* Last Thoughts:

Hey Apple/IBM, can I have a PowerPC so I can port this over?
What colour are the PowerPC's going to be anyway? PowerBook colour?
And what noise will they make on power-up? The public has a right to know.

And where is my next developer CD? And my PowerPC nubus card?
And a Mac with nubus slots that I can put it in? Am I not an 'A' List developer?
Don't answer that.

PCalc -> PCalc II -> PCalc Pro -> PowerPCalc?

I kind of like the name PowerPCalc so I am stamping my © and (TM) all over it now, so when I get a PowerPC in 100 years, I can use it! Will all the PowerPC apps have the word 'Power' at the front like all SNES games have 'Super'?

If you like PCalc and are in a position to get me a freebie subscription to MacWeek, please do so. As sole owner of up-and-coming software house, TLA Systems, I'm sure I qualify. I make all the purchasing decisions on new hardware and software for the company... I'm sure its profits are higher than IBM at the moment anyway...

* The Remote Beta Testers & People Who Got In Touch So Far
(subtitle: I've Never Met Them So They Don't Get A Mention In The Program :-)

Thanks in chronological order to...

...too many people to mention!

So far I have had about a dozen postcards and a good few hundred email messages - not bad considering PCalc has only been out a few months. Having said that, about 4000 folk had downloaded the two previous versions of PCalc from the sumex archive (before they stopped keeping track) and it went out on the comp.binaries.mac newsgroup which probably reached tens of thousands. So where are my postcards?

I'll just namedrop a few of the places I've had cool email from saying they love PCalc - of course this in no way means the companies know who I am or endorse PCalc, just that some of their employees have nothing better to do all day than read netnews and search through the mac archives.

Xerox Parc, and many, many more. Neat huh?

Plus of course some people have sent me disks of stuff and even - shock, horror - money! This is to be encouraged. I've had 3 possible leads to jobs and a number of requests for my resume. This is also to be encouraged, especially for work over the summer.

When I get the time to sort out the mail I've got, people who have sent money or gifts will get a special mention here. Plus, look out for the 'glorious benefactor' list of folk who have sent lots of money, debugged my code, or otherwise pulled strings for me.
Sorry that you are all not mentioned here personally, but I deleted my mailing lists by accident a few days ago...

And if you are the person who stole 150 quid from an envelope in my room the other week, I hope something particularly unpleasant happens to you. Stealing from poor students is neither big, nor clever. At least that solves the 'do I buy an upgrade to the LCIII?' question.

And I do not wish to recieve any more chain letters, thank you.


PCalc(TM), PowerPCalc(TM), TLA Systems(TM), Guilt-Freeware(TM) and the phrase 'A Smile Costs Nothing, A **** Is Extra' are registered trademarks of TLA Systems(TM) which is wholy owned, managed and named by James Thomson (despite what Jonathan Hogg(TM) might say - who is in turn a copyrighted product of TLA Systems(TM) AI Division).

Original file name: PCalc - Read Me First - converted on Thursday, 11 November 1999, 20:13

This page was created using TextToHTML. TextToHTML is a free software for Macintosh and is (c) 1995,1996 by Kris Coppieters