home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
utilities
/
utilsc
/
converter
/
!Converter
/
!Help
next >
Wrap
Text File
|
1996-05-26
|
19KB
|
525 lines
Converter © Copyright 1993 Ian Palmer
=========
Converter is an application that allows easy conversion between different
systems of measurement. It can handle complex conversions which include
combinations of units, for example you can convert meters per second to miles
per hour, or even Newtons per meter to poundals per furlong.
A full list of known units is given at the end of this file, but the general
areas covered are length, area, volume, mass, time, force, energy, pressure,
surface tension, viscosity, frequency and temperature.
Introduction
------------
Converter, when run, installs itself on the iconbar. Pressing SELECT on the
icon brings up the main (weights and measures) converter window, whilst
pressing ADJUST brings up the temperature converter. MENU brings up the main
menu which contains the usual 'Info' and 'Quit' options.
The Temperature Converter
-------------------------
This converter is designed to allow simply conversion between four different
temperature scales, degrees centigrade (or Celsius as it is sometimes, but
incorrectly, known), Kelvin, degrees Fahrenheit, and finally degrees Reaumur.
When you bring up the temperature conversion window it looks a bit like :
-----------------------------------------
| _______ ________ |
| From : |_______| To : |________| |
| |
| <> °C <> °C |
| |
| <> °F <> °F |
| |
| <> K <> K |
| ---- |
| <> °R | OK | <> °R |
| ---- |
|_________________________________________|
To perform a conversion first select the relevant temperature units for the
conversion, and then enter the start value into the writable icon next to the
word 'From :'. Then by pressing RETURN or pressing the 'OK' icon the result
of the conversion will appear in the icon next to the word 'To :'.
So, for example, say you wanted to convert 10°C to °F. You'd first select the
'°C' radio icon on the left hand side of the window, and the '°F' icon on the
right hand side of the window. Then entering '10' into the writable icon and
pressing RETURN will make the value '50' appear in the result icon.
The Weights and Measures Converter
----------------------------------
This converter is much more powerful than the temperature converter described
above. When you bring up the window it looks something like :
------------------------------------------------------------------
| |
| From |
| ___________________ __________________ |
| | | Value : | | |
| |___________________| |__________________| |
| |
| ======================= |
| |
| ___________________ |
| | | |
| |___________________| Dimensions : M L T K |
| |
| |
| To |
| ___________________ __________________ |
| | | Value : | | |
| |___________________| |__________________| |
| |
| ======================= |
| |
| ___________________ |
| | | |
| |___________________| Dimensions : M L T K |
| |
| __ _ _ _____ ____ |
| <> Normal /Kg\ |=| /|\ || |Clear| | OK | |
| ---- |-| \_/ () ----- ---- |
| <> Engineering |
|__________________________________________________________________|
Now this takes a little explaining. Think of the window as being separated
into three parts, the top part describes the 'from' part of the conversion,
ie. what you wish to convert from. The middle part describes the 'to' part of
the conversion and is similar in layout to the 'from' part. The bottom
section of the window is general control over the conversion and also
displays some information about the conversion (more on that later).
Now both the 'from' and 'to' sections are further divided into three
sections, on the left are two writable icons separated by a black line. These
icons are for entering the units for the conversion. The next subsection is
the 'Value' section, on the 'from' section this is a writable icon for you to
enter the value to be used in the conversion, in the 'to' section this icon
is filled in by the program. The final subsection details the 'dimensions' of
the expression you have entered into the icons in the first subsection (more
on this later).
Let's have a simple example. Say you wanted to convert 10 miles into
kilometers. What you would need to do is enter 'mile' into the top left icon
in the 'from' section (leave the lower left icon in this section blank), then
enter 'km' into the top left icon in the 'to' section (again leave the lower
left icon blank), and finally enter the value '10' into the Value icon in the
'from' section. Pressing RETURN at this stage (or selecting the 'OK' icon in
the bottom right of the window) will make the program perform the conversion,
the value '16.09344' will appear in the value icon in the 'to' section.
NOTE: When entering the units 'mile' and 'km' make sure these are entered in
lower case.
So what are the icons that we left blank in the above example for? Well they
are for more complex conversions to be performed. Think of the two icons on
the left of the 'from' section as a fraction, the top icon is the numerator,
the lower icon the denominator. The use of this is shown in the following
example :
Say we wanted to convert 50 miles per hour to kilometers per hour. Leave the
'mile' and 'km' entered in the first example as they are, but enter 'hour'
in bottom left icons in both the 'from' and 'to' sections. Now replace the
'10' in the value icon in the 'from' section with '50' and press RETURN or
select the OK icon. The value '80.46720001' will appear as the result.
In fact the denominator icons aren't strictly necessary. You could place all
the units on the numerator line. For example the last example could be
performed by entering 'mile hour-1' into the numerator icon for the 'from'
section (denominator icon blank), and 'km hour-1' into the numerator icon in
the 'to' section (again denominator blank). This is because any value placed
directly after a unit (no space in between) is taken as the power of that
unit, thus cm2 is equivalent to 'centimetres squared', etc.
Please note that in the above there is a space between the word 'mile' and
'hour-1'. This space is necessary and must be present between all units
entered into these icons. So for example you could enter 'meters per second'
as 'm s-1' but NOT 'ms-1' (as this would be taken as milliseconds to