home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
110.UNITSARC.EXE
/
UNITS
< prev
next >
Wrap
Text File
|
1988-01-25
|
9KB
|
214 lines
U N I T S - Version 1.3
I. About UNITS
II. Licensing/Liability
III. Using The Menu System
IV. Temperature Conversions
V. Using USETUP
VI. Suggestions & Complaints
I. About UNITS
UNITS is a small expert system for the conversion of measurement
units. While it is not about to set the artificial intelligence
community back on its ear, it does know more than the average Joe
about units of measurement and their conversion. Can YOU give
the speed of light in furlongs per fortnight? Thought not.
( c = 1,802,617,499,800 furlong/fortnight )
To invoke UNITS, simply enter "units" at the DOS prompt.
A menu system leads you through the entry of the unit names. You
may use scientific notation for very large or small numbers.
Examples:
1.495678E12 = 1,495,678,000,000
5.6E-15 = 0.000 000 000 000 005 6
45.762E5 = 4,576,200
Note the optional use of the negative sign in the exponent, and
the lack of spaces.
UNITS will handle anything up to and including the simple
compound units such as A*B (eg. foot pounds) and A/B (eg. meters
per second), as well as special compound units of force,
pressure/vacuum, energy, and power.
A word on precision:
UNITS uses reasonably precise arithmetic code, and conversion
factors supplied by the National Bureau of Standards and ASTM.
However, it does NOT guarantee the precision of the last few
digits in complicated conversions, particularly when going
between units of vastly different magnitudes. Converting from
angstroms per second to parsecs per week, for example, will
almost certainly result in errors in the last few digits.
Occasionally, a relatively simple conversion will result in a
rounding error of a few parts in a million (try converting one
pound avoirdupois to ounces.) These are almost always easy
to spot and ignore.
Similarly, some units can be converted two different ways. The
pressure unit psi can be converted to pascals by using the
Pressure Units menu (the most straightforward way), or by doing
the compound unit conversion: pound-force per inch² to newton per
meter². UNITS will report slightly different values depending
on the route selected, but the conversions are equivalent to
within a part-per-million or so, which should be enough for most
applications.
II. Licensing/Liability
UNITS is user-supported software. It is also copyrighted.
Permission is hereby granted to copy and distribute this program
to others, so long as the following files are included:
UNITS.EXE
USETUP.EXE
USETUP.INF
UNITS
ULICENSE
The simplest way to do this is to distribute the self-extracting
archive form of this program, UNITSARC.EXE.
Users who find this program useful are asked to send a $15
registration fee with the UNITS registration, which may be printed
by entering:
TYPE ULICENSE > PRN
Registered users are entitled to support, notification of updates
to UNITS, and updates at cost (the price of a floppy disk and
mailing).
UNITS is written in PROLOG -- specifically the Turbo PROLOG
dialect (with extensions) of Borland International, Inc.
Registered users who are interested in experimenting with the
program may obtain a copy of the source code for $40 -- with the
understanding that recompiling the program with only minor
changes to the code and a new copyright notice will be considered
a violation of copyright.
Care has been taken to make UNITS a reasonably accurate utility;
however we will not accept liability for any use of this program,
nor for any data processed with it.
III. Using The Menu System
Whenever UNITS requires you to make a choice, it will present you
with a menu of the possible selections. To pick one, simply move
the highlight bar (using the arrow keys) to the selection you
wish, and press either Enter or F-10 (function key # 10).
The first menu asks you to select the TYPE of conversion you
desire. At present, UNITS supports the straightforward
conversion of simple units of measurement, and the conversion of
compound units of the type A*B (eg. foot-pounds) or A/B (eg.
miles per hour). The conversion of units of temperature is
treated as a special case.
The second menu asks you to pick the type of quantity you are
measuring, mass, for instance, or volume. For a compound unit,
you must specify the type of each of the two units.
The third menu allows you to select the particular unit from
which you wish to convert. We would be interested to hear of any
units you require which are not currently supported by UNITS.
If you select certain metric units, such as the meter, gram or
kelvin, UNITS will also ask you to specify the desired metric
prefix (such as kilo- or nano-). If there is no prefix, simply
press the Enter (or F-10) key at this point.
If you make a mistake, pressing the Esc key at any menu will return
you to the first UNITS menu, allowing you to start over again.
Pressing the Esc key on the first menu will allow you to exit
UNITS.
A shortcut:
Some UNITS menus, including the first menu and the units-of-time
menu, are presented as a single column of options, each beginning
with a lowercase letter. Pressing the letter of the option you
desire will jump the highlight bar to that option without using
the arrow keys.
IV. Temperature Conversion
UNITS converts between temperatures expressed in the four main
thermodynamic temperature scales: Kelvin, Celsius, Fahrenheit,
and Rankine. It does not expressly handle conversions for
intervals of temperature, as in: "This instrument is accurate to
within 3 degrees Celsius."
You can do this conversion by understanding that a degree Celsius
is the same size as a kelvin, and a degree Fahrenheit is the same
size as a degree Rankine, and that the kelvin and Rankine scales
share the same zero point.
Therefore, "within 3 degrees Celsius" is equivalent to "within 3
kelvin", and using UNITS we discover that 3 kelvin is equal to
5.4 degrees Rankine. "Within 5.4 degrees Rankine" is equivalent
to "within 5.4 degrees Fahrenheit", and so we can write: "This
instrument is accurate to within 5.4 degrees Fahrenheit."
V. Using USETUP
UNITS is accompanied by an installation routine (USETUP.EXE)
which allows you to set the screen colors for the various menus and
windows in UNITS. USETUP makes changes directly to the UNITS
program file AND SHOULD ONLY BE USED ON YOUR WORKING COPY OF UNITS.
Always save an archive copy of the program.
USETUP first checks to make sure that its information matches
your current version of UNITS, and will not run if the versions
do not match. The data file USETUP.INF must be in the same
directory as USETUP, or the program will not run.
USETUP first asks you to supply the "path" to the copy of UNITS
that you wish to install. If USETUP and UNITS are in the same
directory, you need only press the Enter key at this point,
otherwise, enter the DOS path to UNITS, such as:
C:\UTILITY\
USETUP next asks if you have a color monitor. If the reply is
"n" (no), USETUP sets UNITS for the default monochrome display
and ends without further warning. If the answer is "y" (yes),
USETUP gives you the option of using the standard UNITS color
selection.
You may also select your own color scheme. Use the arrow keys
to select the window you wish to change from the menu. (You
may wish to run UNITS first to get an idea of what each window
looks like.) Press Enter to start working on a window. You
must choose four colors:
The color used to display text.
The color used for the background.
The color used for text that is highlighted
(as in a menu).
The color used for the background of
highlighted text.
There are eight available colors for each selection: Black, Blue,
Green, Cyan, Red, Magenta, Brown, and White. The Left-Right
arrow keys step you through the text colors; the Up-Down keys through
the background colors. When you start, you will be adjusting the
normal text/background settings. Pressing the Home key switches
to the highlighted text/background settings (and back again).
Your current settings are displayed in the top-left window, and
examples are shown in the top-right window. Press Enter to
register your selections for that particular window and to
return to the menu to select another window.
VI. Suggestions & Complaints
Please report any problems or suggestions for improvements to:
Michael Baum
3004 Westcott Street
Falls Church, VA 22042
(703) 237-9439