A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw60/CLHS/Body/f_terpri.htm below:

CLHS: Function TERPRI, FRESH-LINE

CLHS: Function TERPRI, FRESH-LINE Function TERPRI, FRESH-LINE

Syntax:

terpri &optional output-stream => nil

fresh-line &optional output-stream => generalized-boolean

Arguments and Values:

output-stream -- an output stream designator. The default is standard output.

generalized-boolean---a generalized boolean.

Description:

terpri outputs a newline to output-stream.

fresh-line is similar to terpri but outputs a newline only if the output-stream is not already at the start of a line. If for some reason this cannot be determined, then a newline is output anyway. fresh-line returns true if it outputs a newline; otherwise it returns false.

Examples:

 (with-output-to-string (s)
    (write-string "some text" s)
    (terpri s)
    (terpri s)
    (write-string "more text" s))
=>  "some text

more text"
 (with-output-to-string (s)
    (write-string "some text" s)
    (fresh-line s)
    (fresh-line s)
    (write-string "more text" s))
=>  "some text
more text"

Side Effects:

The output-stream is modified.

Affected By:

*standard-output*, *terminal-io*.

Exceptional Situations:

None.

See Also: None.

Notes:

terpri is identical in effect to

 (write-char #\Newline output-stream)

Copyright 1996-2005, LispWorks Ltd. All rights reserved.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4