home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d987
/
mcalc.lha
/
MCalc
/
MCalc.doc
< prev
next >
Wrap
Text File
|
1994-04-05
|
22KB
|
724 lines
Welcome to MUIProCalc v1.3. This is a short description on how to use
MUIProCalc and what possibilities it offers. Anyway, it is a quite
powerful calculator, also suited for programmers who have to deal with
different computer specific calculations and values.
MUIProCalc doesn`t stand for MUI'Professional'Calc. It is meant to
stand for MUI'Programmer'Calc...
MUIProCalc (MCalc) is (C) 1993 Kai Iske, GiftWare
The icon for MUIProCalc was taken from the ToolManager 2.0
distribution and was designed by Michael 'Mick' Hohmann.
MUI is Copyright (C) Stefan Stuntz
*NOTE* that you better set the stack size to at least 8192 bytes
Copyright
*********
You are allowed to copy and spread this program but only if you do
not make any commercial profit out of the program itself and all
supported files. The source of MUIProCalc is considered teachware and
the author claims the right to be the only one to produce and
distribute new versions of MUIProCalc. Public Domain vendors are not
allowed to sell MUIProCalc for more than the price of a regular disk,
which should not be higher than 5 Dollars.
MUIProCalc is GiftWare, so if you like it and you you want to express
your feelings, feel free to send me anything you think of being suited.
Postcards, cookies, money, simply anything ;)
Guarantee
*********
The author does not give any guarantee that the program MUIProCalc
works perfectly. The program was tested and it is used every day,
anyway nobody is perfect and that is why I can not take the
responsibilty for any damages occured during the usage of MUIProCalc.
Evolution
*********
Due to the fact that I was still using Calc 3.0, written by Jimmy
Yang, which wasn`t that compatible to newer Kickstarts, I thought about
writing a new one, since I couldn`t find any calculator suited my
needs. Not that Calc 3.0 was/is buggy, but it`s just the fact that it
isn`t font adaptive. Furthermore I wanted to know how powerful MUI
really was, so I thought it`d be a good idea to write it using MUI.
Taking Calc 3.0, I tried to implement the functionality of this
calculator, putting it into a MUI-GUI. What is still missing is the
plotter. This may change in a later release.
One word to the parser: The grammar might not be perfect. There`s
only a small amout of syntax checking, in order to minimize parser
size. Float value error handling isn`t perfect either, yet. I just
wanted to have a calculator as soon as possible. All this will change
in future releases, if there are enough of replies.
Installing MUIProCalc
*********************
Installing MUIProCalc isn`t that hard. First of all you should get
hold of MUI (MagicUserInteface) and install it. MUIProCalc relies on
MUI, since the complete User Interface was written using this great
system.
Having installed MUI (if you haven`t done so already), you may copy
the program `MCalc' and it`s icon `MCalc.info' to a place you like.
If you want to use the online help, you have to have AmigaGuide(C)
installed. If so, move the supplied `MCalc.guide' file to the same
directory you moved the main program to.
That`s it. In order to get online help, simply position the mouse
over the object you want to get help for and MUIProCalc will pop up a
window containing the help text.
One word to the menu shortcuts : They might not be Style Guide
compliant, but I think it`ll work just fine, anyway ;)
*NOTE* that you better set the stack size to at least 8192 bytes
Using MUIProCalc
****************
Well, it isn`t that hard to use MUIProCalc. The main input window is
devided into three areas, which are
The input/output area
=====================
Within this area (the upper) you see a String gadget and a ListView
gadget. The String gadget is used to enter the expressions you want to
calculate.
Within the ListView you see a history of all entered expressions and
results. Per default the left column of the ListView is used to display
the expression, whilst the right one reflects the result. You may set
the number of lines bufferd using the Preferences. Furthermore you may
tell MUIProCalc how to format the entry, i.e. you may have four
different output types. See History, to find out more about history
settings.
Function tables
===============
Within this area you`ll find all the functions supported by
MUIProCalc. Simply click on the function you want to be added to the
expression. You will also notice a Cycle gadget. This one may be used
to switch between two function tables. The first set is a more
mathematical set, whilst the second might only be of use to
programmers. There are functions for bit-manipulation etc.pp.
This Group may be hidden, thus leading to more space. See Layout, to
find out more about that.
Input fields
============
These are buttons probably known from any other calculator. Simply
click on the digit/operator you want to add to your expression. The
characters 'A-F' are used to enter hexadecimal values. The other
characters 'X-Z' are memories. These can be set using an expression of
the form
x = sqrt (2*3)
This expression will set memory 'X' to the result of 'sqrt (2*3)'.
You may now use this value during other operations. You may even set a
memory relative to another one, like
x = y + sqrt (2*3)
MUIProCalc supports four different value formats, these are :
`Decimal'
Decimal values are entered with no additional characters, like
'2.12322'. You may even enter doubles using scientific notation,
like '2.123e-2'
`Hexadecimal'
These values are preceded by a '$'-sign or by '0x'
`Octal'
These values are preceded by a '\'-sign
`Binary'
These values are preceded by a '%'-sign
The '!' operator is used to calculate the factorial of a value. This
one is limited to a value of !170.
The 'Exec' button may be used to 'start' the calculator. This can
also be done, by simply hittin RETURN from within the String gadget
'CLR' clears the current display.
'ACLR' will clear the display and all memories
This Group may be hidden, thus leading to more space. See Layout, to
find out more about that.
The menus
=========
MUIProCalc offers a set of menus. These are :
Project
-------
The Project menu offers three entries :
`Preferences...'
Will open the Preferences editor (see Prefs)
`About...'
Will display about messages
`Quit'
Will quit MUIProCalc
History
-------
If you prefer to use your mouse or the menu shortcuts you may paste
an entry from the history to the current cursor position from within
this menu :
`Pick left entry'
Will pick the left entry from the list and paste it to the current
cursor position. If only one column is shown, this will be used
(see Prefs).
`Pick right entry'
Will pick the right entry from the list and paste it to the
current cursor position. If only one column is shown, this will be
used (see Prefs).
`Copy left entry'
Selecting this item will copy the left entry from the history to
the selected clipboard unit. If only one column is show, this one
will be used (see Prefs).
`Copy right entry'
Selecting this item will copy the right entry from the history to
the selected clipboard unit. If only one column is show, this one
will be used (see Prefs).
Display Bases
-------------
This menu may be used to set the display mode for output. You may
have 'Decimal', 'Hexadecimal', 'Octal', or 'Binary' output.
In any other mode than 'Decimal' there will be no difference between
'Signed' and 'Unsigned' modes (see Sign).
The default output type may be set using Output.
Size
----
For the 'Hexadecimal', 'Octal', and 'Binary' modes (see Bases), you
may set an output value size (number of bits). This will
reduce/increase maximum numbers.
The default output type may be set using Output.
Sign
----
For 'Decimal' output (see Bases), you may have signed or unsigned
results, when you enter 'Hexadecimal', 'Octal', or 'Binary' values.
The default output type may be set using Output.
Angle
-----
For trigonometrical functions you may set the type of angle you`ve
entered. If you set 'RAD', the values will be interpreted as of type
radians, but if you set 'DEG' angles will be interpreted as of type
degree.
The default output type may be set using Output.
The ARexx Port
==============
In addition to the default ARexx commands every MUI application
knows about, MUIProCalc offers some more, these are :
As with every MUI Application the name of the ARexx Port is
constructed from the base name of the Application. For MUIProCalc this
will be 'MCALC'.
BTW: If you read something about TeX compatible output, this means
you may use these strings directly within a mathematical environment.
The current conversion routine isn`t quite intelligent I have to admit.
Maybe I`ll add a smarter one for the next release...
There are two scripts included for use with CygnusED which
demonstrate how to use the ARexx Port.
CALC - Command
--------------
Format:
CALC EXPRESSION
Template:
EXPRESSION/A
Parameter:
Any valid expression as accepted by MUIProCalc
Result:
Will be a string containing the calculated expression
Example:
CALC '1 + 2 + 3'
6.000000
CALCTEX - Command
-----------------
Format:
CALCTEX EXPRESSION
Template:
EXPRESSION/A
Parameter:
Any valid expression as accepted by MUIProCalc
Result:
Will be a string containing the calculated expression converted to
TeX compatible format.
Example:
CALCTEX '1 / 100000'
1\\cdot 10^{-5}
GETOUTPUT - Command
-------------------
Format:
GETOUTPUT [ENTRY]
Template:
ENTRY/N
Parameter:
Supply an entry number you want to get from the history`s output
list. ENTRY may either be
* n Any valid entry ranging from 0-n, where n is the last entry
in the list. If an illegal value is supplied, MUIProCalc will
return the last entry from the list.
* -1 For the active entry
* -2 For the topmost entry
* -3 For the bottommost entry
Result:
Will be a string containing the expression at the specified entry.
Example:
GETOUTPUT 2
12.000001
GETTEXOUTPUT - Command
----------------------
Format:
GETTEXOUTPUT [ENTRY]
Template:
ENTRY/N
Parameter:
Supply an entry number you want to get from the history`s output
list. ENTRY may either be
* n Any valid entry ranging from 0-n, where n is the last entry
in the list. If an illegal value is supplied, MUIProCalc will
return the last entry from the list.
* -1 For the active entry
* -2 For the topmost entry
* -3 For the bottommost entry
Result:
Will be a string containing the expression at the specified entry,
formatted to TeX compatible output.
Example:
GETTEXOUTPUT 3
1\\cdot 10^{-5}
GETINPUT - Command
------------------
Format:
GETINPUT [ENTRY]
Template:
ENTRY/N
Parameter:
Supply an entry number you want to get from the history`s input
list. ENTRY may either be
* n Any valid entry ranging from 0-n, where n is the last entry
in the list. If an illegal value is supplied, MUIProCalc will
return the last entry from the list.
* -1 For the active entry
* -2 For the topmost entry
* -3 For the bottommost entry
Result:
Will be a string containing the expression at the specified entry.
Example:
GETINPUT 2
2 + 2 + 3 + 4
GETTEXINPUT - Command
---------------------
Format:
GETTEXINPUT [ENTRY]
Template:
ENTRY/N
Parameter:
Supply an entry number you want to get from the history`s input
list. ENTRY may either be
* n Any valid entry ranging from 0-n, where n is the last entry
in the list. If an illegal value is supplied, MUIProCalc will
return the last entry from the list.
* -1 For the active entry
* -2 For the topmost entry
* -3 For the bottommost entry
Result:
Will be a string containing the expression at the specified entry,
formatted to TeX compatible output.
Example:
GETTEXINPUT 3
1\\cdot 32
FORMATTEX - Command
-------------------
Format:
FORMATTEX EXPRESSION
Template:
EXPRESSION/A
Parameter:
Supply an expression you would like to have converted to TeX
compatible format.
Result:
Will be a string containing the converted expression, formatted to
TeX compatible output.
Example:
FORMATTEX '1 * 10^-5'
1\\cdot 10^{-5}
SETMODE - Command
-----------------
Format:
SETMODE [BASE=DEC|HEX|OCT|BIN] [SIZE=8|16|32]
[SIGN=SIGNED|UNSIGNED] [ANGLE=RAD|DEG]
Template:
BASE/K,SIZE/K,SIGN/K,ANGLE/K
Parameter:
BASE
Specify a new conversion/output base for ARexx calculations.
You may supply either one of the following :
* DEC Decimal output
* HEX Hexadecimal output
* OCT Octal output
* BIN Binary output
SIZE
Specify the default conversion size for
hexadecimal/octal/binary values. You may supply either one of
the following :
* 8 8 Bits
* 16 16 Bits
* 32 32 Bits
SIGN
Specify signed or unsigned output. Supply either one of :
* SIGNED Signed output
* UNSIGNED Unsigned output
ANGLE
Spcify the default type of supplied angles. This may either
be :
* RAD Angles of type radians
* DEG Angles of type degree
Result:
This will always be FALSE (0)
Example:
SETMODE 'BASE=HEX' 'SIZE=8' 'SIGN=SIGNED' 'ANGLE=DEG'
Preferences
***********
Within the Preferences window you may configure some of MUIProCalc`s
default values. These are :
Furthermore the active function table, set with the 'Functions'
cycle gadget within the main window, will be taken into account.
`Use'
will use the current settings and store them temporarily, so if you
restart MUIProCalc, these settings will be used again.
`Save'
will save/store the settings on disk.
`Cancel'
will restore the previously used values.
Window layout
=============
Within this group there are two CheckBox gadgets. if the 'No
Functions' CheckBox is set, the main window will not contain the
function tables. If not the function tables will be displayed. If you
set 'No Input' the input fields will not be displayed. If you clear
this CheckBox, the lower gadget group will be displayed.
Using the 'In/Out Order' gadget you may control the ordering of the
input String gadget and the output ListView gadget. When 'Input then
Output' is selected, the String gadget will appear 'on top' of the
ListView. Otherwise ('Output then Input') it will appear underneath the
ListView.
Output settings
===============
You may set the default values for 'Display Bases', 'Size', 'Sign'
and 'Angle' here.
See Bases Size Sign Angle
History settings
================
Using the 'Lines' Slider gadget you may adjust the maximum number of
lines to capture during a session.
With the 'Entries' Cycle gadget you may set the output format for
the history. You may choose from the following formats :
`Input & Ouput'
Within the left column you`ll see the expression entered. In the
right column there`ll be the result for that expression.
`Output & Input'
Is the opposite to the above
`Input'
Will only show your input expression
`Output'
Will only show the result
Misc
====
Set the 'Clear input on exit' CheckBox gadget if you prefer to have
the input gadget cleared every time you`ve entered an expression.
Otherwise simply clear it.
The 'Flush memory' CheckBox gadget may be used to tell MUIProCalc to
flush all unused libraries (including unused MUI-Classes) from memory
on exit, thus freeing all that precious memory used up by MUIProCalc.
Using the 'ClipUnit' Slider gadget you may set the default
clipboard unit for History clipping. Simply select a unit you want to
use.
Whom I must say 'thank you'
***************************
I would like to thank the following people
`Dirk Federlein'
For betatesting and suggestions
`Stefan Stuntz'
Especially for MUI and for answering all my questions...
`Volker Güth'
For being the first (and only one so far) contacting me just
because of MUIProCalc...
`My girlfriend'
Who accepts what I`m doing
...and all the others I forgot
How to obtain updates
*********************
MUIProCalc will be available on ADS, FRAS, FTP, and Fred Fish disks
as soon as there`s a new release available.
How to contact the author
*************************
If you have any questions, suggestions, bug reports or anything else
you want to tell me, you may contact me under one of these addresses.
Either use normal snail mail:
Kai Iske
Brucknerstrasse 18
63452 Hanau
Germany
Tel.: +49-(0)6181-850181
or reach me using electronical mail
USENET: kai@iske.adsp.sub.org
FIDO: Kai Iske, 2:244/6302.11
ZNET: KAI@SWEET.ZER
Program history
***************
Revision V1.3
--------------
created on Friday, 11.02.94 23:34:08 by Kai Iske. LogMessage :
-*- changed on Friday, 11.02.94 23:35:32 by Kai Iske. LogMessage :
- One couldn`t use 1e3 for scientific notation of 1000. You
had to write 1.0e3. Changed
(Reported by : Henry Norman)
- No more error lines will be copied from History
(Requested by : Stefan Stuntz)
-*- created on Friday, 11.02.94 23:34:08 by Kai Iske. LogMessage :
- "Radiant" was wrong. Changed. Why didn`t anybody tell me.
(Reported by : Henry Norman)
- Chose wrong case for mathematical "e".
(Reported by : Henry Norman)
Revision V1.2
--------------
created on Tuesday, 19.10.93 23:41:00 by Kai Iske. LogMessage :
-*- changed on Wednesday, 08.12.93 23:48:31 by Kai Iske. LogMessage :
- Default number of history lines increased
(Requested by : Stefan Stuntz)
-*- changed on Sunday, 05.12.93 22:30:41 by Kai Iske. LogMessage :
- No checks were made on the ENTRY argument to an ARexx
function
-*- changed on Sunday, 05.12.93 18:13:56 by Kai Iske. LogMessage :
- For calculations via ARexx one can set the type, size, sign
and angle flags seperately, now
-*- changed on Sunday, 05.12.93 17:50:09 by Kai Iske. LogMessage :
- Improved error handling from within ARexx commands a bit
-*- changed on Sunday, 05.12.93 17:46:35 by Kai Iske. LogMessage :
- MUIProCalc may output TeX style mathematical expressions
when using the ARexx commands. Additionally there is another
option to convert expressions to TeX format.
(Requested by : Volker Güth)
-*- changed on Sunday, 05.12.93 16:47:59 by Kai Iske. LogMessage :
- Added more ARexx functions to the default ones
(CALC, GETINPUT, GETOUTPUT)
(Requested by : Volker Güth)
-*- changed on Sunday, 05.12.93 01:47:36 by Kai Iske. LogMessage :
- MUIProCalc didn`t handle extremly small values
(Reported by : Volker Güth)
-*- changed on Sunday, 05.12.93 01:38:18 by Kai Iske. LogMessage :
- Default values weren`t set up
- ACLR and CLR gadget have got menu entries too, now
(Requested by : Volker Güth)
- History entries may be copied to clipboard now
(Requested by : Volker Güth)
-*- changed on Saturday, 27.11.93 01:01:25 by Kai Iske. LogMessage :
- Recompiled using SAS 6.50
-*- changed on Wednesday, 20.10.93 00:24:41 by Kai Iske. LogMessage :
- Bug in ListView display fixed
-*- created on Tuesday, 19.10.93 23:41:00 by Kai Iske. LogMessage :
- You may now tell MCalc to clear the input string after
hitting RETURN or EXEC.
Revision V1.1
--------------
created on Tuesday, 12.10.93 01:50:26 by Kai Iske. LogMessage :
-*- changed on Sunday, 17.10.93 15:03:10 by Kai Iske. LogMessage :
- Save and Use gadgets weren`t arranged as proposed
by the AUISG. (Reported by: Stefan Stuntz)
- Changed layout of Prefs window a bit
(Suggested by: Stefan Stuntz)
-*- changed on Friday, 15.10.93 18:39:50 by Kai Iske. LogMessage :
- NOT operator didn`t behave as expected ;) It was a simple
negate... (Reported by : Top on IRC)
-*- changed on Thursday, 14.10.93 18:01:32 by Kai Iske. LogMessage :
- Hex-Values may be entered using 'C'-Style now (e.g. 0xff)
-*- changed on Thursday, 14.10.93 00:34:55 by Kai Iske. LogMessage :
- One can use the faktorian '!' behind numbers now, too.
(Suggested by : Top on IRC)
-*- changed on Thursday, 14.10.93 00:28:52 by Kai Iske. LogMessage :
- One could accidentially change the ordering of the
functions and input-gadgets groups by using
'No Functions' and 'No Input' (reported by: Top on IRC)
-*- created on Tuesday, 12.10.93 01:50:26 by Kai Iske. LogMessage :
- Order of Input and Ouput gadgets (String + ListView) may be
set now, ie. the input string may show up underneath the
ListView and vice versa (Requested by Dirk Federlein)
Revision V1.0
--------------
created on Saturday, 02.10.93 02:12:50 by Kai Iske. LogMessage :
--- Initial release ---