disable print-vector-length by default
svn: r7818
This commit is contained in:
parent
44478fa8e0
commit
0d44c0c57a
|
@ -354,7 +354,7 @@
|
|||
(advance c init-line!)
|
||||
(when (vector? (syntax-e c))
|
||||
(let ([vec (syntax-e c)])
|
||||
(out (format "#~a" (vector-length vec)) p-color)
|
||||
(out "#" #;(format "#~a" (vector-length vec)) p-color)
|
||||
(if (zero? (vector-length vec))
|
||||
(set! src-col (+ src-col (- (syntax-span c) 2)))
|
||||
(set! src-col (+ src-col (- (syntax-column (vector-ref vec 0))
|
||||
|
@ -611,7 +611,7 @@
|
|||
[(or (list? v)
|
||||
(vector? v))
|
||||
(let* ([vec-sz (if (vector? v)
|
||||
(+ 1 (string-length (format "~a" (vector-length v))))
|
||||
(+ 1 #;(string-length (format "~a" (vector-length v))))
|
||||
0)])
|
||||
(let ([l (let loop ([col (+ col 1 vec-sz)]
|
||||
[v (if (vector? v)
|
||||
|
|
|
@ -10,11 +10,11 @@ values. Unlike a list, a vector supports constant-time access and
|
|||
update of its elements.
|
||||
|
||||
A vector prints similar to a list---as a parenthesized sequence of its
|
||||
elements---but a vector is prefixed with @litchar{#} and the length
|
||||
of the vector. The vector length is optional for a vector as an
|
||||
expression. Also, a vector as an expression implicitly quotes the
|
||||
forms for its content, which means that identifiers and parenthesized
|
||||
forms in a vector constant represent symbols and lists.
|
||||
elements---but a vector is prefixed with @litchar{#}. For a vector as
|
||||
an expression, an optional length can be supplied. Also, a vector as
|
||||
an expression implicitly quotes the forms for its content, which means
|
||||
that identifiers and parenthesized forms in a vector constant
|
||||
represent symbols and lists.
|
||||
|
||||
@refdetails/gory["parse-vector"]{the syntax of vectors}
|
||||
|
||||
|
|
|
@ -169,8 +169,9 @@ to three octal digits (only as many as necessary).
|
|||
In @scheme[display] mode, the printed form of a vector is @litchar{#}
|
||||
followed by the printed form of @scheme[vector->list] applied to the
|
||||
vector. In @scheme[write] mode, the printed form is the same, except
|
||||
that a decimal integer is printed after the @litchar{#} when the
|
||||
@scheme[print-vector-length] parameter is @scheme[#t].
|
||||
that when the @scheme[print-vector-length] parameter is @scheme[#t], a
|
||||
decimal integer is printed after the @litchar{#}, and a repeated last
|
||||
element is printed only once..
|
||||
|
||||
@section[#:tag "print-hashtable"]{Printing Hash Tables}
|
||||
|
||||
|
|
|
@ -86,14 +86,14 @@ on the next character or characters in the input stream as follows:
|
|||
@dispatch[@litchar{[}]{starts a pair or list; see @secref["parse-pair"]}
|
||||
@dispatch[@litchar["{"]]{starts a pair or list; see @secref["parse-pair"]}
|
||||
|
||||
@dispatch[@litchar{)}]{matches @litchar{(} or raises @Exn{exn:fail:read}}
|
||||
@dispatch[@litchar{]}]{matches @litchar{[} or raises @Exn{exn:fail:read}}
|
||||
@dispatch[@litchar["}"]]{matches @litchar["{"] or raises @Exn{exn:fail:read}}
|
||||
@dispatch[@litchar{)}]{matches @litchar{(} or raises @Exn[exn:fail:read]}
|
||||
@dispatch[@litchar{]}]{matches @litchar{[} or raises @Exn[exn:fail:read]}
|
||||
@dispatch[@litchar["}"]]{matches @litchar["{"] or raises @Exn[exn:fail:read]}
|
||||
|
||||
@dispatch[@litchar{"}]{starts a string; see @secref["parse-string"]}
|
||||
@dispatch[@litchar{,}]{starts a quote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar{`}]{starts a quasiquote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar{,}]{starts an unquote or splicing unquote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar{,}]{starts an [splicing] unquote; see @secref["parse-quote"]}
|
||||
|
||||
@dispatch[@litchar{;}]{starts a line comment; see @secref["parse-comment"]}
|
||||
|
||||
|
@ -117,7 +117,7 @@ on the next character or characters in the input stream as follows:
|
|||
@dispatch[@litchar["#! "]]{starts a line comment; see @secref["parse-comment"]}
|
||||
@dispatch[@litchar["#!/"]]{starts a line comment; see @secref["parse-comment"]}
|
||||
@dispatch[@litchar{#`}]{starts a syntax quasiquote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar{#,}]{starts an syntax unquote or splicing unquote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar{#,}]{starts an syntax [splicing] unquote; see @secref["parse-quote"]}
|
||||
@dispatch[@litchar["#~"]]{starts compiled code; see @scheme[current-compile]}
|
||||
|
||||
@dispatch[@cilitchar{#i}]{starts a number; see @secref["parse-number"]}
|
||||
|
@ -715,7 +715,7 @@ neither defines nor uses graph tags for other top-level forms.
|
|||
|
||||
@local-table-of-contents[]
|
||||
|
||||
@section[#:tag "parse-reader"]{Reading via an External Reader}
|
||||
@section[#:tag "parse-reader"]{Reading via an Extension}
|
||||
|
||||
When the reader encounters @as-index{@litchar{#reader}}, then it loads
|
||||
an external reader procedure and applies it to the current input
|
||||
|
|
|
@ -174,7 +174,7 @@ A parameter that controls printing box values; defaults to
|
|||
@defboolparam[print-vector-length on?]{
|
||||
|
||||
A parameter that controls printing vectors; defaults to
|
||||
@scheme[#t]. See @secref["print-vectors"] for more information.}
|
||||
@scheme[#f]. See @secref["print-vectors"] for more information.}
|
||||
|
||||
@defboolparam[print-hash-table on?]{
|
||||
|
||||
|
|
|
@ -83,7 +83,11 @@ in several significant ways:
|
|||
used carefully; library functions should typically allow "~" to be
|
||||
a relative path).
|
||||
|
||||
- Hash table printing is enabled by default.
|
||||
- Hash table printing is enabled by default, and vector-length
|
||||
printing is disabled by default. Opaque structure instances no
|
||||
longer print with a leading "struct:" between angle brackets, and
|
||||
built-in procedures print with "procedure:" instead of
|
||||
"primitive:".
|
||||
|
||||
- Graph input syntax, such as `#0=(1 . #0#)' is no longer allowed in
|
||||
program syntax parsed by `read-syntax', though it is still allowed
|
||||
|
|
|
@ -6263,7 +6263,7 @@ static void make_initial_config(Scheme_Thread *p)
|
|||
init_param(cells, paramz, MZCONFIG_PRINT_GRAPH, scheme_false);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_STRUCT, scheme_true);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_BOX, scheme_true);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_VEC_SHORTHAND, scheme_true);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_VEC_SHORTHAND, scheme_false);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_HASH_TABLE, scheme_true);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_UNREADABLE, scheme_true);
|
||||
init_param(cells, paramz, MZCONFIG_PRINT_PAIR_CURLY, scheme_false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user