History of Board Foot Calculator Script
Webb - all rights reserved - ©2004
spacer


modified by Russ Webb on  2004-04-22 21:10:39

Author - James Cook
Email: Jim_Cook@ieee.org
Webpage:

Summary: Calculate lumber volume and pricing in board-feet

Instructions: If you've ever needed to calculate the price of a
beautiful piece of hardwood at your local
lumberyard, this program will come in handy.
Even if you have no use for this, take a look at
the code for techniques you can use in your own
programs.  The program still needs some
tightening.  At one point I repeat a calculation
in two different places and any time you need to
repeat the same calculation, it's best to build a
subroutine and Call it instead.

One board-foot is defined as the volume of a 1
inch thick, 12 inch wide piece of lumber 1 foot
long.  Thus, a 1/2 inch thick board 6 inches wide
and 4 feet long is also one board-foot.  Lumber
in the US is usually priced in dollars per board-
foot.

The variable buttons in my programs usually work
just like the buttons on an HP-48 calculator.  
Enter the variable on the stack and tap the
button to store.  Tap Rcl and then the variable
name to recall the value stored.  Tap Slv and the
unknown variable to solve.  Clr clears all
variables.

The x\4 takes the number of "quarters" from the
stack and coverts it to decimal inches and stores
in the thickness variable.  Some lumber is sold
as "five quarter" or 1 1/4" thick, etc.  T stores
the thickness in decimal inches.  W stores the
width in decimal inches.  L stores the length in
feet.

[$] stores the price per board-foot. bdft is the
number of board-feet.  $Tot is the total price of
the lumber.


Example:

How much is a board of 5/4 Maple 6.5" wide and
3.5' long that costs $40 a board foot?


[Clr]
5 [X/4] or 1.25 [T]
6.5 [W]
3.5 [L]
40 [$]
[Slv] $Tot 94.79 dollars
[Rcl] 2.37 board feet

Code:

RPN.2.i+1\Board Foot\
{o}Cc;
[a]xaxbxc**Cb/;  \calc bd-ft \
[b] #'12'; \inches in foot \
[c]0Xa0Xb0Xc0Xd0Xe0Xf0Xg;
\a=thickness, b=width, c=length, d=menu, e=cost per bft, f=board foot,
g=cost\
"Board Foot Calc"
"Board Foot Calc"D'Calculates the volume & value\ of lumber as 1 in x 12
in x 1 ft =\ 1 bd-ft * $ = $ Total'd1;
~
"_x/4:thickness of board in quarter inches"
xdc(4/Xa:xa4*:xfxc/xb/Cb*Xaxa4*)0Xd;
"_T:thickness of board (in inches)" xdc(Xa:xa:xfxc/xb/Cb*Xaxa)0Xd;
"_W:width of board (in inches)" xdc(Xb:xb:xfxc/xa/Cb*Xbxb)0Xd;
"_L:length of board (in feet)"
xdc(Xc:xc:xfxb/xa/Xcxc)0Xd;
~
"_$:cost per board foot"
xdc(Xe:xe:xgxf/Xexe)0Xd;
"_bdft:board foot"
xdc(Xf:xf:Cag10=0(d1xgxe/)Xfxf)0Xd;
"_$Tot:total cost per board"xdc(Xg:xg:xf0=0(CaXfxf:xf)xe*Xgxg)0Xd;
~
"Rcl:Recall stored variable"1Xd;
"Slv:Solve for unknown variable"2Xd;
"Clr:Clear all variables" Cc;
"Abt:About" D'Board Foot Calculator\James E. Cook (c) 2000
\Jim_Cook@ieee.org'd1;



modified by Jim Cook on  2004-07-09 15:45:30

Author - James Cook
Email: James_Cook@ieee.org
Webpage:

Summary: Calculate lumber volume and pricing in board-feet

Instructions: If you've ever needed to calculate the price of a
beautiful piece of hardwood at your local
lumberyard, this program will come in handy.
Even if you have no use for this, take a look at
the code for techniques you can use in your own
programs.  The program still needs some
tightening.  At one point I repeat a calculation
in two different places and any time you need to
repeat the same calculation, it's best to build a
subroutine and Call it instead.

One board-foot is defined as the volume of a 1
inch thick, 12 inch wide piece of lumber 1 foot
long.  Thus, a 1/2 inch thick board 6 inches wide
and 4 feet long is also one board-foot.  Lumber
in the US is usually priced in dollars per board-
foot.

The variable buttons in my programs usually work
just like the buttons on an HP-48 calculator.  
Enter the variable on the stack and tap the
button to store.  Tap Rcl and then the variable
name to recall the value stored.  Tap Slv and the
unknown variable to solve.  Clr clears all
variables.

The x\4 takes the number of "quarters" from the
stack and coverts it to decimal inches and stores
in the thickness variable.  Some lumber is sold
as "five quarter" or 1 1/4" thick, etc.  T stores
the thickness in decimal inches.  W stores the
width in decimal inches.  L stores the length in
feet.

[$] stores the price per board-foot. bdft is the
number of board-feet.  $Tot is the total price of
the lumber.


Example:

How much is a board of 5/4 Maple 6.5" wide and
3.5' long that costs $40 a board foot?


[Clr]
5 [X/4] or 1.25 [T]
6.5 [W]
3.5 [L]
40 [$]
[Slv] $Tot 94.79 dollars
[Rcl] 2.37 board feet

Code:

RPN.2.i+1\Board Foot\
{o}Cc;
[a]xaxbxc**Cb/;  \calc bd-ft \
[b] #'12'; \inches in foot \
[c]0Xa0Xb0Xc0Xd0Xe0Xf0Xg;
\a=thickness, b=width, c=length, d=menu, e=cost per bft, f=board foot,
g=cost\
"Board Foot Calc"
"Board Foot Calc"D'Calculates the volume & value\ of lumber as 1 in x 12
in x 1 ft =\ 1 bd-ft * $ = $ Total'd1;
~
"_x/4:thickness of board in quarter inches"
xdc(4/Xa:xa4*:xfxc/xb/Cb*Xaxa4*)0Xd;
"_T:thickness of board (in inches)" xdc(Xa:xa:xfxc/xb/Cb*Xaxa)0Xd;
"_W:width of board (in inches)" xdc(Xb:xb:xfxc/xa/Cb*Xbxb)0Xd;
"_L:length of board (in feet)"
xdc(Xc:xc:xfxb/xa/Xcxc)0Xd;
~
"_$:cost per board foot"
xdc(Xe:xe:xgxf/Xexe)0Xd;
"_bdft:board foot"
xdc(Xf:xf:Cag10=0(d1xgxe/)Xfxf)0Xd;
"_$Tot:total cost per board"xdc(Xg:xg:xf0=0(CaXfxf:xf)xe*Xgxg)0Xd;
~
"Rcl:Recall stored variable"1Xd;
"Slv:Solve for unknown variable"2Xd;
"Clr:Clear all variables" Cc;
"Abt:About" D'Board Foot Calculator\James E. Cook (c) 2000
\James_Cook@ieee.org'd1;



modified by Jim Cook on  2004-07-22 15:17:27

Author - James Cook
Email: James_Cook@ieee.org
Webpage:

Summary: Calculate lumber volume and pricing in board-feet

Binary: Yrpn_Board_Foot_Calc.pdb

Instructions: If you've ever needed to calculate the price of a beautiful piece of hardwood at your local lumberyard, this program will come in handy.  Even if you have no use for this, take a look at the code for techniques you can use in your own programs.

One board-foot is defined as the volume of a 1 inch thick, 12 inch wide piece of lumber 1 foot long.  Thus, a 1/2 inch thick board 6 inches wide and 4 feet long is also one board-foot.  Lumber in the US is usually priced in dollars per board-foot.

The variable buttons in my programs usually work just like the buttons on an HP-48 calculator.  Enter the variable on the stack and tap the button to store.  Tap [Rcl] and then the variable name to recall the value stored.  Tap [Slv] and the unknown variable to solve.  [Clr] clears all variables.

The [x\4] takes the number of "quarters" from the stack and coverts it to decimal inches and stores in the thickness variable.  Some lumber is sold as "five quarter" or 1 1/4" thick, etc.  [T_in] stores the thickness in decimal inches.  [W_in] stores the width in decimal inches.  [L_in] stores the length in inches.

[$@] stores the price per board-foot. [bdft] is the number of board-feet.  [$tot] is the total price of the lumber.

Example:

How much is a board of 5/4 Maple 6.5" wide and 3.5' long that costs $40 a board foot?

[Clr]
5 [X/4] or 1.25 [T_in]
6.5 [W_in]
42 [L_in]
40 [$@]
[Slv] [$tot] 94.79 dollars
[Rcl] [bdft] 2.37 board feet

Code:

RPN.2.i+3\Board Foot\
{o}Cc;
[a]xaxbxc**#'12'/;
[c]0Xa0Xb0Xc0Xd0Xe0Xf0Xg;
\a=thickness, b=width, c=length, d=menu, e=cost per bft, f=board foot, g=cost\
"Board Foot Calc"
"Board Foot Calc" D'Calculates the cost of lumber\ based on price per board foot.'d1;
~
"_x/4:thickness of board in quarter inches" xdc(4/Xa:xa4*)0Xd;
"_T_in:thickness of board (in inches)" xdc(Xa:xa)0Xd;
"_W_in:width of board (in inches)" xdc(Xb:xb)0Xd;
"_L_in:length of board (in inches)"
xdc(#'12'/Xc:xc)0Xd;
~
"_$@:cost per board foot"
xdc(Xe:xe)0Xd;
"_bdft:board foot"
xdc(Xf:xf:CaXfxf)0Xd;
"_$tot:total cost of lumber"xdc(Xg:xg:xf0=0(Ca:xf)xe*Xgxg)0Xd;
~
"Rcl:Recall stored variable"1Xd;
"Slv:Solve for unknown variable"2Xd;
"Clr:Clear all variables" Cc;
"Abt:About" D'Board Foot Calculator\Written by Jim Cook\James_Cook@ieee.org'd1;