home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p2_9dc.seq
< prev
next >
Wrap
Text File
|
1990-03-30
|
503b
|
25 lines
\ Rectangle program for problem 2.9
\ Author: Dickson Cheng 03/30/90 13:50:38.40
: .LW ( l w -- )
SWAP
CR ." Length: " .
CR ." Width : " . ;
: AREA ( l w -- )
CR ." Area: " * . ;
: PERIMETER ( l w -- )
CR ." Perimeter: " + 2 * . ;
: RECTANGLE ( l w -- )
2DUP .LW
2DUP AREA
PERIMETER ;
: MESSAGE ( -- )
DARK CR ." To run RECTANGLE type l w RECTANGLE." ;
MESSAGE