home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p2_8dc.seq
< prev
next >
Wrap
Text File
|
1990-03-30
|
705b
|
22 lines
\ Word definition for problem p2.8C
\ Author: Dickson Cheng 03/30/90 13:19:20.33
: SPIN ( a b c -- c b a )
SWAP ROT ;
: HATCH ( a b c -- a b b c )
OVER SWAP ;
: SHOVE ( a b c -- c a b c )
-ROT 2 PICK ;
: TANK_AREA ( l w h -- )
3DUP ( l w h -- l w h l w h )
5 ROLL * 2 * ( l w h l w h -- w h l w h*l*2 )
-ROT * 2 * ( w h l w h*l*2 -- w h h*l*2 l*w*2 )
+ ( w h h*l*2 l*w*2 -- w h h*l*2+l*w*2 )
-ROT * 2 * ( w h h*l*2+l*w*2 -- h*l*2+l*w*2 w*h*2 )
+ ( h*l*2+l*w*2+w*h*2 )
CR ." Surface area of tank is " . ." square feet" ;