$nl
"Prettyprinter words are found in the " { $vocab-link "prettyprint" } " vocabulary."
$nl
-"The key words to print an object to " { $link output-stream } "; the first two emit a trailing newline, the second two do not:"
+"The key words to print an object to " { $link output-stream } "; the first three emit a trailing newline, the second three do not:"
{ $subsections
.
+ ...
short.
pprint
pprint-short
"Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size."
} ;
+HELP: ...
+{ $values { "obj" object } }
+{ $description "Prettyprints an object to " { $link output-stream } " with a trailing line break. Output is unlimited in length." }
+{ $warning
+ "Printing a large object can take a long time and consume a lot of memory. If you need to print large objects, use " { $link short. } " or set some " { $link "prettyprint-variables" } " to limit output size."
+} ;
+
+{ . ... } related-words
+
HELP: unparse
{ $values { "obj" object } { "str" "Factor source string" } }
{ $description "Outputs a prettyprinted string representation of an object. Output is influenced by many variables; see " { $link "prettyprint-variables" } "." }
: . ( obj -- ) pprint nl ;
+: ... ( obj -- ) [ . ] without-limits ;
+
: pprint-use ( obj -- ) [ pprint* ] with-use ;
: unparse ( obj -- str ) [ pprint ] with-string-writer ;