Movatterモバイル変換


[0]ホーム

URL:


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


22.1.1.1 Multiple Possible Textual Representations

Mostobjects have more than one possible textual representation. For example, the positiveinteger with a magnitude of twenty-seven can be textually expressed in any of these ways:

 27    27.    #o33    #x1B    #b11011    #.(* 3 3 3)    81/3

A list containing the two symbolsA andB can also be textually expressed in a variety of ways:

 (A B)    (a b)    (  a  b )    (\A |B|) (|\A|  B)

In general, from the point of view of theLisp reader, whereverwhitespace is permissible in a textual representation, any number ofspaces andnewlines can appear instandard syntax.

When a function such asprint produces a printed representation, it must choose from among many possible textual representations. In most cases, it chooses a program readable representation, but in certain cases it might use a more compact notation that is not program-readable.

A number of option variables, calledprinter control variables, are provided to permit control of individual aspects of the printed representation ofobjects. The next figure shows thestandardizedprinter control variables; there might also beimplementation-definedprinter control variables.

*print-array**print-gensym**print-pprint-dispatch**print-base**print-length**print-pretty**print-case**print-level**print-radix**print-circle**print-lines**print-readably**print-escape**print-miser-width**print-right-margin*

Figure 22-1. Standardized Printer Control Variables

In addition to theprinter control variables, the following additionaldefined names relate to or affect the behavior of theLisp printer:

*package**read-eval*readtable-case*read-default-float-format**readtable*

Figure 22-2. Additional Influences on the Lisp printer.

22.1.1.1.1 Printer Escaping


The followingX3J13 cleanup issue,not part of the specification, applies to this section:


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996-2005, LispWorks Ltd. All rights reserved.


[8]ページ先頭

©2009-2025 Movatter.jp