Health Script
Webb - all rights reserved - ©2004
spacer
Author - Oscar Gonzales
Email: oscgonzales@mediaone.net
Webpage:

Summary: Calculate percentage body fat and body mass index

Instructions: To set variable, put number in display register
then press appropriate lower case key.  To see
results press upper case key.  
ht: Set height in inches or centimeters.
wt: Set weight in pounds or kilograms.
neck: Set neck measurement right below the adams apple.
waist: Set waist; men at navel, women at smallest.
hips: WOMEN ONLY Set hips at maximum.
mode: Set ENGLISH or METRIC mode.
view: Display variable.
clear: Clear variables.

M%:  Show Males percentage body fat.
F%:  Show females percentage body fat.
BMI: Show Body Mass Index

Suggestions and comments welcome.

Code:

RPN.1.q+1 \ Health
[z]1xm#'1.54'*+;
[y]1xm#'0.5464'*-;
[m] 1;

"Health"
"_ht: \Enter height." Xa;
"_wt: \Enter weight." Xb;
"_neck: \Enter neck, below adams apple." Xc;
~
"_waist: Enter waist;\At navel for men.\At minimum for women." Xd;
"_hips(f): \Enter hips at maximum.\(Women only)" Xe;
~
"M%: Show male % body fat.\2-4:necc.  5-13:athl.  14-17
fit\18-25:accept          25+:obese"
xdxc-Cz*L#'.19077'*#'1.0324'r2-xaCz*L#'.15456'*+#'495'r2/#'450'-;
"F%: Show female % bodyfat.\10-12:necc 14-20:athl
21-24:fit\25-31:accept          32+:obese"
xdxe+xc-Cz*L#'.35004'*#'1.29579'r2-xaCz*L#'.221'*+#'495'r2/#'450'-;

"BMI: Get Body Mass Index\<18 or >26 : Unhlthy,19-21:best\  21-23:good
-- 23-26:Avg. "
xbCy*xaCz*#'100'/g1*/;
~
"mode: Set measurement
mode"xm0=0(D'Metric|Metric(cm)|English(in)|':D'English|Metric(cm)|English(in)|')Xm;

"view: Show variables"D'Show which?|ht|wt|neck|waist|hips|'1+x@;
"clear: Clear all variables"0Xa0Xb0Xc0Xd0Xe;