Handbook
Glossary
(pidigits) ( k z n row col -- )
Vocabulary
benchmark
.
pidigits
Inputs
k
an
object
z
an
object
n
an
object
row
an
object
col
an
object
Outputs
None
Definition
USING:
formatting
io
kernel
math
math.parser
;
IN:
benchmark.pidigits
::
(pidigits)
( k z n row col -- )
n 0
>
[
z
next
:>
y z y
safe?
[
col 10
=
[
row 10
+
y
"\t:%d\n%d"
printf
k z y
produce
n 1
-
row 10
+
1
(pidigits)
]
[
y
number>string
write
k z y
produce
n 1
-
row col 1
+
(pidigits)
]
if
]
[
k 1
+
z k
consume
n row col
(pidigits)
]
if
]
[
row col
padded-total
]
if
;