]> gitweb.factorcode.org Git - factor.git/commitdiff
formatting: fix docs for padding and use a better example 1465/head
authorJon Harper <jon.harper87@gmail.com>
Mon, 24 Aug 2015 20:40:39 +0000 (22:40 +0200)
committerJon Harper <jon.harper87@gmail.com>
Sun, 30 Aug 2015 16:43:59 +0000 (18:43 +0200)
Make the padding number coherent between the example and the docs.
Also bump it from 3 to 10 because [[3.14 "%'#5f" printf]] is "3.140000"
because the default precision is 6.

basis/formatting/formatting-docs.factor

index ce7800cdbdfa90d8b68bcae8a72caeedf727460f..00982c52cc0bc04bbc0e3f94fb7e19e50eeb1b66 100755 (executable)
@@ -42,7 +42,7 @@ HELP: printf
     { $list
         { { $snippet "%5s" } " formats a string padding with spaces up to 5 characters wide." }
         { { $snippet "%03d" } " formats an integer padding with zeros up to 3 characters wide." }
-        { { $snippet "%'#5f" } " formats a float padding with " { $snippet "#" } " up to 3 characters wide." }
+        { { $snippet "%'#10f" } " formats a float padding with " { $snippet "#" } " up to 10 characters wide." }
         { { $snippet "%-10d" } " formats an integer to 10 characters wide and left-aligns." }
     }
     $nl