home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
temp.seq
< prev
next >
Wrap
Text File
|
1990-04-08
|
351b
|
15 lines
\ Compute area of a circle to three decimal places.
: CIRCLE_AREA ( r -- )
DUP * 355 * 113 /MOD
." Area = " 5 .R \ ( 8 EMIT ) 1 BACKSPACES
ASCII . EMIT
5 0 DO
10 * 113 /MOD 1 .R \ ( 8 EMIT ) 1 BACKSPACES
LOOP DROP ;
: TEST_CIRC ( -- )
11 1 DO CR I CIRCLE_AREA LOOP ;