EasyManua.ls Logo

HP HP-28S - BOXS Without Local Variables

HP HP-28S
341 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BOXS Without Local Variables
The following
program
uses only stack
operations
to calculate
the
sur-
face of a box.
Compare
this
program
with
BOXS.
3:
height
2:
width
1 :
length
Program
·K
DUP2
:t
F.:OT
4 PICK
:t
+
F.:OT
I':OT
:t
+
'J
'-
l
:~:.
Arguments
Results
"7.
~
..
2:
1 : area
Comments
Begin
the
program.
Calculate
wI.
Move w to level
1.
Copy
h to level
1.
Calculate
who
Calculate wI +
who
Move
h
and
I to levels 2
and
1.
Calculate
hI.
Calculate wI +
wh
+ hI.
Calculate 2(wl +
wh
+ hI).
End
the
program.
Because this version
of
BOXS
isn't
a
user
function, it
can't
be
used
in
algebraic syntax.
244
28:
Programming
Examples

Table of Contents

Other manuals for HP HP-28S

Related product manuals