home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
426.lha
/
TextCalc
/
read.me.later
< prev
next >
Wrap
Text File
|
1990-10-03
|
12KB
|
325 lines
TextCalc (c) 1990 John A. Samuels
Welcome to TextCalc, the text file calculator!
If you're reading this (and you are, aren't you?) you should have already
tried the tutorial and you probably know most of what you need to know.
Here are some things that you don't know yet...
- COPYRIGHT -
This program and the associated text files are copyright 1990 by:
John A. Samuels
2121 South 12th Street
Allentown, PA 18103
FAX: (215) 797-4088
PLink: BATMAN
CIS: 71066,307
- WARRANTY -
None whatsoever! This program does not work, will not work and never did
work the way it was intended. I couldn't care less if TextCalc causes your
Amiga to explode and take a city block with it.
- HERE, THERE, AND EVERYWARE -
You are hereby granted a lifetime site license to use and abuse TextCalc as
you see fit. Of course, the above-mentioned lifetime may be abbreviated if
you steal my code or make money off of the fruits of my labor by selling this
program for profit. So don't do it.
That being said, if this program proves so valuable to you that you can't
remember what life was like Before TextCalc (B.T.), you should immediately
send me a certified check for one-half of your total assets (please don't
send farm animals through the U.S. Mail).
- COPY PROTECTION -
You will need the code wheel that was included with this program's packaging.
Then copy the 17th character of the 15th word on the 13th line of the 11th
page of the manual. You will have to type it three times. Then, turn off
your Amiga and, with your index finger in your left nostril, recite all of
the words to Marty Robbins' "El Paso". Then turn your Amiga back on and
gently kick your dog. You are now ready to use TextCalc.
- DEDICATION -
TextCalc is dedicated to Roman Polanski who, as I understand it, invented the
Roman Numeral - thereby making all numeric calculations possible.
- STARTING THE PROGRAM -
Sorry, no icons. From a CLI or Shell, start TextCalc like so:
run tc <filename> [precision]
<filename> is the path and name of a text file.
[precision] is optional. It's the number of digits you want to the right of
the decimal point in your calculations. The precision can be any number from
zero (0) to six (6). It defaults to '2' for all you money-minded people out
there.
Not to belabor the point, but here's an example of how to start TextCalc:
run tc df1:documents/cockroach.letter 4
This will run 'tc' and tell it to load the file "cockroach.letter" from the
directory "documents" on the device "df1:". TextCalc will use and display
four (4) digits to the right of the decimal point.
Another example:
run tc fred
This will run 'tc' and tell it to load the file "fred" from the current
directory. Since no precision was supplied the precision will default to
'two'.
You should always 'run' it so that you can multitask.
- WHAT HAPPENS NEXT? -
Assuming you did everything correctly, you'll see the first 18 lines of your
document on the screen.
To see the next 18 lines, click on the gadget that has the right-pointing
arrow in it that's on the bottom of the screen near the center.
To see the previous 18 lines, click on the left-arrow gadget that's to the
left of the right-arrow gadget.
If, for some reason, the text you're looking at is not the text you wanted to
look at you'll have to exit the program and supply a different (correct) file
name on the command line.
- QUITTING THE PROGRAM -
Click on the close box. If you've never used an Amiga before and you don't
know what the close box is, read that pretty four-color manual that was in
the carton.
- WHAT KIND OF FILES WILL WORK? -
Anything, I guess. The less of a plain old ASCII text file it is, the more
weird stuff you'll see on the screen but you can still use TextCalc. It's
very indiscriminate.
- HOW CAN I CALCULATE NUMBERS WITHIN THE TEXT? -
Glad you asked.
A simple arithmetic calculation requires two numbers. Y'know, like a
numerator and a denominator in a division. I seem to remember from fourth
grade that they were called "operands". Even if they aren't, for our
purposes we'll call them the "left operand" and the "right operand". Ok?
To establish the left operand, click on any number in your document with the
LEFT mouse button.
If TextCalc agrees that it truly IS a number, it will turn red. It will also
appear in two more places - the "Left Button" string gadget and the "L Click
Sum" string gadget. More on the "L Click Sum" string gadget later.
To establish the right operand, click on any number in your document with the
RIGHT mouse button.
If it's a number by TextCalc's definition, it will turn red and white. It
will also appear in the "Right Button" string gadget.
Now choose a sign. In other words, choose what operation you want to perform
on the left and right operands. It can be addition, subtraction,
multiplication or division.
To choose a sign, click on one of the four red "sign" gadgets located between
the "Left Button" and "Right Button" gadgets.
The current sign is displayed just above the four sign gadgets.
For multiplication, a '*' is displayed and for division, a '/' is displayed.
If you know why, you may now smile smugly to yourself.
Finally, to force TextCalc to perform your requested calculation, click on
that big purple and yellow "equals" gadget.
The result will immediately be printed in the "L-R Result" string gadget. It
will also be added to whatever was in the "Running Total" string gadget and
the new running total will be displayed in the "Running Total" string gadget.
- SO WHAT? -
Well, for one thing, you don't have to change EVERYTHING when you want to do
another calculation.
Let's say you want to multiply 15 X 30 and then 15 X 40. Let's say all those
numbers are in the file you've loaded into TextCalc.
Click on the '15' with the Left Button. Click on the '30' with the Right
Button. Click on the 'X' (multiplication) gadget. Click on the 'equals'
gadget. '450' will appear in the "L-R Result" string gadget.
Now, just click on '40' with the Right Button. Then click the 'equals'
gadget. '600' will appear in the "L-R Result" string gadget. And '1050'
will be in the "Running Total" gadget.
Now, if you wanted to divide '15' by '40' all you would have to do is click
on the 'divide' gadget, then click on the 'equals' gadget.
You don't have to re-click on a number or sign if it's going to remain the
same for the next calculation(s).
- WHAT'S THE L CLICK SUM? -
It's a way for you to do quick addition.
Every number you click on with the Left Button will be added to the number
that's in the "L Click Sum" string gadget and the new sum will be printed in
the "L Click Sum" string gadget.
So to add up a bunch of numbers, just click click click with the Left Button,
then check the answer in the "L Click Sum" string gadget.
You may now ask why there is an 'addition' sign gadget along with the other
three signs. I don't know - symmetry, I guess.
- CLEARING NUMBERS -
Each string gadget has a "clear" gadget underneath it. It's blue and has a
yellow 'c' inside of it.
Clicking on it will cause the number inside that string gadget to be zero.
- STRING GADGETS -
I have now used the phrase "string gadget" 16 times so far in this text. I'm
trying to subtly communicate that these are...string gadgets.
If you don't know how to use "string gadgets", read that glossy book that was
in the carton with your Amiga.
In TextCalc, the string gadgets do everything you'd want them to do. You can
edit whatever's in them, delete their contents (although the "clear" gadgets
will do that quicker), and, most important, you can type numbers into them.
This means that if you need to use some number that's not in your document,
you can just type it in to the applicable string gadget.
TextCalc will use whatever's in its string gadgets for its calculations.
Of course, this works in the "L Click Sum" and "Running Total" string gadgets
too so these totals do not have to start at zero and do not have to only
contain TextCalc generated numbers.
Naturally, you can use any of the Amiga's standard editing keys or key
sequences to alter the contents of these string gadgets. Right-Amiga-X
clears it, DEL deletes characters, etc.
- WHAT IF I TYPE "MARILYN QUAYLE" INTO A STRING GADGET? -
Any non-numeric stuff in a string gadget will make that string gadget's
contents evaluate as "zero". For example, if you type "Marilyn Quayle" into
the "Left Button" string gadget, it will equal zero. If, in this example,
you had a '15' in the "Right Button" string gadget and "multiplication" was
the active "sign" and you clicked the "equals" gadget, your "L-R Result"
(i.e. the result of the multiplication) would be zero.
- THE LOG FILE -
None of this would be that useful if not for the "log" file.
TextCalc writes every calculation into a file called "tc.log". When you quit
TextCalc, you'll find "tc.log" in RAM:
You can read, print, edit or delete the log file.
And, of course, you can load it into TextCalc and perform calculations on it.
If ram:tc.log exists when you run TextCalc, any calculations will be appended
to the log file.
So if you want to start the log file anew, you'll have to delete it before
running TextCalc.
Each "L Click Sum" operation is recorded in "tc.log".
And each time you click the "equals" gadget, the operation is recorded in
"tc.log".
It's like an electronic paper tape.
- HOW DOES TextCalc RECOGNIZE A NUMBER? -
To be recognized as a number, a character string in your text file must
contain nothing but the following characters:
0 1 2 3 4 5 6 7 8 9 ( ) + - C % $ , .
TextCalc will go backwards from where you clicked until it finds an "illegal"
character and then forwards from where you clicked. Everything in between
will be considered part of the number.
It will not recognize a Yen symbol, a Pound symbol or a Lire symbol, for
instance, because I couldn't figure out how to generate any of those
characters from my keyboard. Thus, TextCalc stands as yet another example of
why it's great to be an American. It WILL recognize Canadian Dollars but
they will be worth less than the U.S. ones. Oh, relax, I'm just kidding, eh?
For you British chaps (hi Frank!), TextCalc will NOT recognize a comma as the
decimal point (do you call it a "decimal point" or, perhaps, a "decimal
sliver"?) Commas are transparent to TextCalc. If this generates sufficient
outcry from our friends across the Atlantic, I'll add a command line option
to facilitate this.
When in doubt, just click. If TextCalc doesn't like what you've clicked on
it will just ignore you. Just like your wife.
Don't forget...if TextCalc adamantly refuses to process something that you've
clicked on in your text file, you can always resort to typing into one of the
string gadgets in order to have it participate in your calculation.
- WILL IT WORK ON THE AMIGA 3000? -
I have no idea. Send me one, freight prepaid, and I'll let you know.
- WILL IT WORK WITH AMIGADOS 2.0? -
Don't know that either.
- WILL IT WORK ON MY PC OR MAC AT THE OFFICE? -
No. Neither will anything else of consequence.
- DOES IT MULTITASK? -
Yeah.
- WHY SHOULD I USE IT? -
Because WordPerfect's math is too complicated and from a cursory reading of
the manual it appears that all numbers have to be in columns before you can
do math on them. And who among us knows how to make columns in WordPerfect?
And because UEdit, the exquisite text editor by Rick Stiles, will only do
addition and subtraction. Of course, if Rick Stiles reads this, he'll put
out the 3,000th revision of UEdit which will do multiplication and division
and put TextCalc and its humble author to shame.
- WHAT SHOULD I USE IT FOR? -
Well, I don't know. At home, I use it to add up columns of baseball
statistics that I download from USA Today's bulletin board. At work I use it
to do math on numbers in documents that I'm writing because I can never find
my calculator and, unlike any of the Amiga's calculator programs I've seen,
you don't have to actually type in the numbers to calculate - just click on
them!
What YOU use it for is your own business so long as it doesn't interfere with
the health or livelihood of those around you.
- WHEN WILL THIS DOCUMENT EVER END?!? -
Now.