(pidigits) ( k z n row col -- )


Vocabulary
benchmark.pidigits

Inputs
kan object
zan object
nan object
rowan object
colan object


Outputs
None

Definition


:: (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 ;