RPN Scripts
RPN Documentation
Submit Script
Conversion
Conversions
Convert
Euro
Euro_Calculator
Soundex
Engineering
Feet_&_Inch
Units
Water
Entertainment
Master_Mind
Sticks!
Finance
Annuity
Euro_Calculator
TVM_Financial_Functions
Math
3D_Vectors_v1.2
Base
Base_Conversions
Complex_Arithmetic
Complex_Math
Discrete_Math
EBBases
Fractions
Fractions
Least
Logs_&_Powers
Misc
Regressions
Scientific
Scientific_Functions
Scientific_Programmable
Simple_Complex_Math
Standard_Normal_Distribution
Trig
Misc
Health
Husband's_Calculator
Physics
Angle_of_View
Depth_of_Field
Physics_Functions
Time
Clock
Julian
Multiple_Timer
Stop5Watch
Stopwatch
Timer
Utility
Board_Foot_Calculator
Calendar_Functions
Checkbook_II
MiniG
Stack_Handling_and_Saving
WindChill
| |
 |
Board Foot Calculator
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;
|
|
|