13.6 Printing
function | |||||
|
In #'text mode, strings, symbols, identifiers, and keywords print as their character content, a byte string prints as its raw byte content, and a syntax object prints as unquoted. Any other predefined kind of value prints the same in #'text and #'expr mode, but a class can implement Printable so that its instances print differently in different modes.
When pretty is #true, then compound values like lists may print with line breaks to split the output across lines. When pretty is #false, then printing tends to use a single line, but also prints faster. The value of the Printable.current_pretty context parameter is to match pretty while printing, which affects functions like PrintDesc.list.
> print("apple")
apple
"apple"
> print("apple", "banana", "coconut")
apple banana coconut
> print("apple", "banana", "coconut", ~pretty: #true)
apple
banana
coconut
function | |||||
|
function | ||||
| ||||
| ||||
function | ||||
|