home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
fraction.seq
< prev
next >
Wrap
Text File
|
1990-04-08
|
459b
|
20 lines
\ The following definiton will display the improper fraction
\ m/n in the form i.xxxx where p is the number of decimal
\ digits to follow the decimal point.
: I.X ( m n p -- )
>R DUP >R \ Save precision and a copy of divisor
/MOD . \ Display integer portion.
1 BACKSPACES
ASCII . EMIT
R> R>
0 DO
>R 10 R@ */MOD
48 + EMIT R>
LOOP 2DROP ;