FreeForm V1.0
FreeForm is yet another contribution to the still growing zoo of
scientific calculators for the Palm. It is designed to be simple, but
"complete" and it can be scripted for repetitive tasks.
Proceed directly to:
Introduction
Download and Installation
Using FreeForm
Scripting FreeForm
Scripting Examples
Contacting
Introduction
As can be seen from the huge number of caluclators for the Palm, a lot of
people seem not to be satisfied with the existing choices... Well, the same
with me. Over all the years I had gotten used to my old scientific calculator
I got in school -- I wanted something like that for the Palm.
This caluclator should run on my old Palm Professional (PalmOS 2), have all
the standard scientific functions and maybe even be programmable for these
calculations that have to be repeated with only different numbers. So one
day I started reading the PalmOS and Code Warrior docs and here it is:
"FreeForm", my contribution to the still growing zoo of calculators.
I'll explain the name later on.
Download and Installation
The current version is 1.0, compiled at May 3rd, 2002.
Click
here
to download FreeForm, unpack and install it in the usual way.
FreeForm needs "MathLib", so you have to have or install MathLib before
trying FreeForm. FreeForm checks for MathLib, but reacts not very
gracious if it's missing (that's another ToDo item). Now you are
warned.
If you don't have MathLib yet, you can download it from
http://www.radiks.net/~rhuebner/mathlib.html.
Libraries are supported only for PalmOS 2 and higher, so sorry for you who
still have a working Palm 1000 or the like. Floating point math would be
too buggy on these machines, anyway.
Using FreeForm
Actually I tried to design FreeForm in a way that you should not need a
manual -- at least for the basic functionality. I will not explain how to
use a standard scientific calculator, but only mention these features that
usually are not possible with hardware buttons:
* Your first impression is probably something like: "scientific calculator?
Where's the sine???" Here: some of the buttons activate a popup menu, from
which you choose the "hidden" functions:
Through "Sto" (Store), "Rcl" (Recall) and "M+" you have access to 10
memories. "func" is an assortment of functions that are less often used
than "+" and "-", in the "trig" popup ... ? Yes, there's the sine.
* Constants: I included my personal selection of fundamental constants, see
the "Pi" button. I followed the standard, i.e., the physicists',
conventions for their names.
* Angles: FreeForm can deal with degrees and radians (sorry, I never needed
the "new degrees" over the last 15 years...): just point to the "Deg" (or
"Rad") text above the buttons to find another popup. "R>D" and "D>R"
converts rad to degrees and back.
* Minus: I decided to use three buttons for the various types of "minus
signs": "(-)" is used for entering a negative number or exponent, it's
simply a character; "-" (next to the "+" button) is the binary minus and
"+/-" changes the sign of the displayed number. This is a function, so
don't use it to enter a negative number.
* Copy'n'Paste: "Copy" copies (as expected?) the displayed number to the
clipboard. "Paste" is a bit more complex. I decided that trying to extract
a meaningful number from an arbitrary clipboard text was about as
complicated as executing the clipboard. That's the way to "program"
FreeForm -- see the next section.
* Graffiti: You can use stylus input for the numbers and the simple, i.e.
one-letter, keys like "+" or "=" (equivalent: the "return" stroke)
* Not a difference: results can range between about +/-1e-270 and +/-1e270,
but you can enter only exponents with up to two digits. If this is a
serious(!) limit for you, then feel free to contact me.
Scripting FreeForm
The same result as pressing buttons can be acchieved by writing down the
labels of these button in a memo, e.g., copying that string to the
clipboard and pasting it into FreeForm. The "Exec" button is a shortcut to
the "Paste" menu entry. This is not what I would call "programmable", but
has the same effect. I decided for "scriptable".
So the basic procedure is simple, a script can be something like "+3="
for adding three to the displayed value or "x^2 + 25 = sqrt" (square it,
add 25 (5^2) and calculate the square root of that sum).
The general rule is that the label of each button ("sqrt", "+/-", ..), or
the entries of the popup menues ("asinh", "x^y", etc) are used verbatim and
in the order in which you would type(!) them -- without any quotes, of
course. Mostly.
But:
* "(-)" is just written as a minus in front of the number
* "EE" can be replaced by "e", so write 1.234e-5, e.g.
* a line break has the same effect as "="
* Use the entries of the popups, not the label on the respective buttons:
"Sto0" is recognized, "Sto" not. Or: what should be the result of "trig"?
For the constants only use the name without the units (in the square
brackets).
* some keys don't make sense in a script: "DEL", "AC" and "Exec".
* Capitalization is unimportant in a script, the spacing, too. And anything
from a "#" up to the next end of line is ignored, i.e., treated as a comment.
This is where the name "FreeForm" came from: write down the keys in a
virtually free form...
Some keywords only make sense in a script (or call it "program" ;-), that's
where it becomes interesting:
* When a script is running, the display itself is not updated. You can
force an output by the keyword "show".
* Branching: if the display shows (i.e., would show, see above) a non-negative
number and the token "if" is encountered, execution jumps by the number of
lines, that is saved in Memory 0. Otherwise execution continues right after
the "if". So: Store the offset in Mem0, then calculate the condition and
only then add "if". Please have a look at the examples.
* unconditioned loops: "goto" jumps by the (rounded) number that is
displayed, it does NOT use the value of Mem0. I know that this may be
confusing.
When a script is running and you tap the screen you are asked if you want
to interrupt the script. Or you can continue.
Scripting Examples
Copy the complete lines (on your Palm!) including the (last) line break,
then use paste (Menu) or the "Exec" button to run the script.
# Add 3
+3
# Convert to degrees V1
*180/(2*pi)
# Convert to degrees V2
r>d
# Add up all the integers from 1 to the displayed number
sto3 # save final value
2 +/- sto0 # for jumping back two lines
0 sto1 sto2 # init counter (Mem1) and sum (Mem2)
1 m+1 = rcl1 m+2 # increment counter and add to sum
rcl3 - 1 - rcl1 = # how far did we come already?
if # go back by two lines, if... (Mem0 is -2)
rcl2 # ready, show sum
Contacting and Misc Stuff
FreeForm is free of charge (though I was tempted to ask you for some five
bucks... ;-) ), because I could use so much really good free software; but I
retain the copyright and I don't intend to make the source public.
You may use and distribute FreeForm freely in it's archived form, i.e.
including this readme file and any other additional files. If you want to
include it into a compilation of software or put it onto a CD, please ask
for my explicite permission.
If you find a bug, have a comment or suggestion, please feel free to
contact me at tihamer@mac.com.
If you send me a mail, I can inform you about updates, otherwise check at
homepage.mac.com/tihamer/FreeForm.
I did not explicitely denote Trade Marks and the like, but that does not
mean that I do not respect them.
Thanks to Apple for hosting this site at "iTools"! -- this site was, of
course, "Made with a Mac".