16 - Unit conversion imperial/metric

Post Reply
Peet
Posts: 91
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

16 - Unit conversion imperial/metric

Post by Peet »

Another implementation of functions from the Commodore PR100.
Shows a way to use the local label on the 41 similar to a menu.

<A> "F-C" - Fahrenheit/Celsius
<B> "G.US-L" - US Gallon/Liter
<C> "OZ-GR" - Ounce/Gram
<D> "LB-KG" - Pound/Kilogram
<E> "OZ-L" - US Fluid Ounce/Liter

<a> "IN-CM" - Inch/Centimeter
<b> "Y-M" - Yard/Meter
<c> "FT-M" - Feet/Meter
<d> "MI-KM" - Mile/Kilometer
<e> "MI-NM" - Mile/Nautical Mile

A-E or a-e to chose the unit (units to be converted are displayed).
R/S twice without input jumps to the reverse conversion.

e.g.:

LB-KG
<D> Display: LB-KG
Input: 10 R/S Output: 4.5360

KG-LB
<D> R/S R/S Display: KG-LB
Input: 5 R/S Output: 11.0229

IN-CM
<a> (shift A) Display: IN-CM
Input: 10 R/S Output: 25.4000

CM-IN
<a> R/S R/S Display: CM-IN
Input: 10 R/S Output: 3.9370

Code: Select all

LBL "UNIT"
SF 27
LBL A
"F-C"
PROMPT
32
-
5
*
9
/
STOP
"C-F"
PROMPT
1.8
*
32
+
STOP
LBL B
"G.US-L"
PROMPT
3.7854
*
STOP
"L-G.US"
PROMPT
3.7854
/
STOP
LBL C
"OZ-GR"
PROMPT
28.3495
*
STOP
"GR-OZ"
PROMPT
28.3495
/
STOP
LBL D
"LB-KG"
PROMPT
.4536
*
STOP
"KG-LB"
PROMPT
.4536
/
STOP
LBL E
"OZ-L"
PROMPT
.029574
*
STOP
"L-OZ"
PROMPT
.029574
/
STOP
LBL a
"IN-CM"
PROMPT
2.54
*
STOP
"CM-IN"
PROMPT
2.54
/
STOP
LBL b
"Y-M"
PROMPT
.9144
*
STOP
"M-Y"
PROMPT
.9144
/
STOP
LBL c
"FT-M"
PROMPT
.3048
*
STOP
"M-FT"
PROMPT
.3048
/
STOP
LBL d
"MI-KM"
PROMPT
1.609
*
STOP
"KM-MI"
PROMPT
1.609
/
STOP
LBL e
"MI-NM"
PROMPT
.8689
*
STOP
"NM-MI"
PROMPT
.8689
/
STOP
END
Attachments
16_UNIT_konverter.raw
(313 Bytes) Downloaded 12 times
My programmable calculators - former: CBM PR100, HP41CV, HP28S, HP11C - current: HP48G(+), HP35S, DM41X, DM42
Post Reply