diff --git a/startup.4th b/startup.4th index 15eabb7..2985123 100644 --- a/startup.4th +++ b/startup.4th @@ -740,6 +740,10 @@ CREATE PNO-POINTER PNO-BUFFER-END , : #S ( ud -- ) 10 #SB ; +\ Decimal Fixed Precision with u digits after the decimal point +\ Example: 12345 0 <# 3 #DFP #> ≡ "12.345" +: #DFP ( ud1 u -- ud2 ) BEGIN ?DUP WHILE 1- >R # R> REPEAT [CHAR] . HOLD #S ; + \ Display the unsigned number at the top of the stack : DU. ( ud -- "" ) <# #S #> TYPE ; : U. ( u -- "" ) 0 DU. ;