[HARLEQUIN][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


Issue SYMBOL-PRINT-ESCAPE-BEHAVIOR Writeup

Issue:        SYMBOL-PRINT-ESCAPE-BEHAVIOR

Forum: X3J13 Letter Ballot

References: *PRINT-ESCAPE* (X3J13/92-102, p22-4)

Public review comment Moon-1

Public review comment Loosemore-17

Public review comment Pitman-9

Category: CLARIFICATION

Edit history: 21-Jun-93, Version 1 by Steele (based on text by Loosemore)

Status: Proposal CLARIFY passed 10-1 on letter ballot 93-304.

Problem Description:

The description of how symbols are printed when *PRINT-ESCAPE* is

true is too vague. Three PR commentors remarked on this.

Proposal (SYMBOL-PRINT-ESCAPE-BEHAVIOR:CLARIFY):

Replace the text:

\term{Backslashes} and \term{vertical-bars} are included as required.

The \term{current output base} at the time of printing might be relevant.

For example, if \thevalueof{*print-base*} were \f{16}

when printing the symbol \f{face}, it would have to be printed as

\f{\\FACE} or \f{\\Face} or \f{|FACE|},

because the token \f{face} would be read as a hexadecimal

number (decimal value 64206) if \thevalueof{*read-base*} were \f{16}.

with:

When printing a \term{symbol}, the printer inserts enough

\term{single escape} and/or \term{multiple escape}

characters (\term{backslashes} and/or \term{vertical-bars}) so that if

\funref{read} were called with the same \varref{*readtable*} and

with \varref{*read-base*} bound to the \term{current output base}, it

would return the same \term{symbol} (if it is not

\term{apparently uninterned}) or an \term{uninterned} \term{symbol}

with the same \term{print name} (otherwise).

For example, if \thevalueof{*print-base*} were \f{16}

when printing the symbol \f{face}, it would have to be printed as

\f{\\FACE} or \f{\\Face} or \f{|FACE|},

because the token \f{face} would be read as a hexadecimal

number (decimal value 64206) if \thevalueof{*read-base*} were \f{16}.

See \varref{*print-readably*} for additional restrictions concerning

characters with nonstandard \term{syntax types} in the

\term{current readtable}.

Test Case:

Not provided.

Rationale:

Explain more fully what is meant by "as required".

Current Practice:

Not provided.

Cost to Implementors:

Probably relatively small.

Cost to Users:

None. This change doesn't affect anything already guaranteed to the user.

Cost of Non-Adoption:

Vagueness in the language specification.

Benefits:

Better program portability.

Editorial Impact:

Small. A small, localized edit.

Aesthetics:

Mostly neutral.

Discussion:

This addresses comments Moon #1, Loosemore #17, and Pitman #9.


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996, The Harlequin Group Limited. All Rights Reserved.