home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p2_7bs.seq
< prev
next >
Wrap
Text File
|
1990-03-30
|
885b
|
25 lines
\ Comp 462
\ Balraj Sidhu Set: 14D4
\ Date: March 28, 1990
\ Problem 2.7
: tank_volume ( l w h -- )
cr rot dup ." lenght " . ." feet" ( l w h -- w h l )
cr rot dup ." width " . ." feet" ( w h l -- h l w )
cr rot dup ." height " . ." feet" ( h l w -- l w h )
cr * * ." volume " . ." cubic feet." ; ( l w h -- )
: unsigned_tank_volume ( l w h -- )
cr rot dup ." lenght " . ." feet" ( l w h -- w h l )
cr rot dup ." width " . ." feet" ( w h l -- h l w )
cr rot dup ." height " . ." feet" ( h l w -- l w h )
cr * * ." volume " u. ." cubic feet." ; ( l w h -- )
\ Part b
\ The largest number for signed integers is: 31.
\ The largest number for unsigned integer is: 40.
\ Part c
\ Use the warm word to reset fpc.