add cross-reference between data and read/print descriptions
Closes PR 11096
(cherry picked from commit d4f7020cd2
)
This commit is contained in:
parent
7ad41cd9dc
commit
394e62a31e
|
@ -9,7 +9,9 @@ depend on a boolean value typically treat anything other than
|
|||
@racket[#f] as true. The @racket[#t] value is always @racket[eq?] to
|
||||
itself, and @racket[#f] is always @racket[eq?] to itself.
|
||||
|
||||
See also: @racket[and], @racket[or], @racket[andmap], @racket[ormap].
|
||||
@see-read-print["boolean" #:print "booleans"]{booleans}
|
||||
|
||||
See also @racket[and], @racket[or], @racket[andmap], and @racket[ormap].
|
||||
|
||||
|
||||
@defproc[(boolean? [v any/c]) boolean?]{
|
||||
|
|
|
@ -22,6 +22,8 @@ A byte string can be used as a single-valued sequence (see
|
|||
@secref["sequences"]). The bytes of the string serve as elements
|
||||
of the sequence. See also @racket[in-bytes].
|
||||
|
||||
@see-read-print["string"]{byte strings}
|
||||
|
||||
See also: @racket[immutable?].
|
||||
|
||||
@; ----------------------------------------
|
||||
|
|
|
@ -18,6 +18,8 @@ Two characters are @racket[eqv?] if they correspond to the same scalar
|
|||
value. For each scalar value less than 256, character values that are
|
||||
@racket[eqv?] are also @racket[eq?].
|
||||
|
||||
@see-read-print["character"]{characters}
|
||||
|
||||
@; ----------------------------------------
|
||||
@section{Characters and Scalar Values}
|
||||
|
||||
|
|
|
@ -59,6 +59,8 @@ disappear when placed into a weak box (see @secref["weakbox"]) used as
|
|||
the key in a weak @tech{hash table} (see @secref["hashtables"]), or
|
||||
used as an ephemeron key (see @secref["ephemerons"]).
|
||||
|
||||
@see-read-print["symbol"]{symbols}
|
||||
|
||||
@defproc[(symbol? [v any/c]) boolean?]{Returns @racket[#t] if @racket[v] is
|
||||
a symbol, @racket[#f] otherwise.
|
||||
|
||||
|
@ -141,6 +143,8 @@ Two keywords are @racket[eq?] if and only if they print the same.
|
|||
Like symbols, keywords are only weakly held by the internal keyword
|
||||
table; see @secref["symbols"] for more information.
|
||||
|
||||
@see-read-print["keyword"]{keywords}
|
||||
|
||||
@defproc[(keyword? [v any/c]) boolean?]{
|
||||
|
||||
Returns @racket[#t] if @racket[v] is a keyword, @racket[#f] otherwise.}
|
||||
|
@ -178,6 +182,8 @@ for each pair of keywords is the same as using
|
|||
A @deftech{box} is like a single-element vector, normally used as
|
||||
minimal mutable storage.
|
||||
|
||||
A literal or printed box starts with @litchar{#&}. @see-read-print["box"]{boxes}
|
||||
|
||||
@defproc[(box? [v any/c]) boolean?]{
|
||||
|
||||
Returns @racket[#t] if @racket[v] is a box, @racket[#f] otherwise.}
|
||||
|
|
|
@ -80,6 +80,9 @@ keys:}} If a key in an @racket[equal?]-based hash table is mutated
|
|||
hash table's behavior for insertion and lookup operations becomes
|
||||
unpredictable.
|
||||
|
||||
A literal or printed hash table starts with @litchar{#hash},
|
||||
@litchar{#hasheqv}, or
|
||||
@litchar{#hasheq}. @see-read-print["hashtable"]{hash tables}
|
||||
|
||||
@defproc[(hash? [v any/c]) boolean?]{
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
(module mz racket/base
|
||||
#lang at-exp racket/base
|
||||
|
||||
(require scribble/struct
|
||||
scribble/manual
|
||||
scribble/eval
|
||||
|
@ -128,10 +129,17 @@
|
|||
(define raco-doc
|
||||
'(lib "scribblings/raco/raco.scrbl"))
|
||||
|
||||
(provide see-read-print)
|
||||
(define (see-read-print tag-part #:print [print-tag-part tag-part] vals)
|
||||
@elem{See @secref[(string-append "parse-" tag-part)]
|
||||
for information on @racket[read]ing
|
||||
@|vals| and @secref[(string-append "print-" print-tag-part)]
|
||||
for information on @racket[print]ing @|vals|.})
|
||||
|
||||
(provide speed)
|
||||
(define-syntax speed
|
||||
(syntax-rules ()
|
||||
[(_ id what)
|
||||
(t "An " (racket id) " application can provide better performance for "
|
||||
(elem what)
|
||||
" iteration when it appears directly in a " (racket for) " clause.")])))
|
||||
" iteration when it appears directly in a " (racket for) " clause.")]))
|
||||
|
|
|
@ -87,6 +87,8 @@ exact, and when they are @racket[=] (except for @racket[+nan.0], @racket[+nan.f]
|
|||
@racket[+0.0], @racket[+0.0f0], @racket[-0.0], and @racket[-0.0f0], as noted above). Two numbers are
|
||||
@racket[equal?] when they are @racket[eqv?].
|
||||
|
||||
@see-read-print["number"]{numbers}
|
||||
|
||||
@local-table-of-contents[]
|
||||
|
||||
@; ----------------------------------------
|
||||
|
|
|
@ -97,6 +97,8 @@ Cyclic data structures can be created using only immutable pairs via
|
|||
and using some number of @racket[cdr]s returns to the starting pair,
|
||||
then the pair is not a list.
|
||||
|
||||
@see-read-print["pair" #:print "pairs"]{pairs and lists}
|
||||
|
||||
@; ----------------------------------------
|
||||
@section{Pair Constructors and Selectors}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ Symbols @racket[print] the same as they @racket[write], unless
|
|||
@racket[print]ed form is prefixed with @litchar{'}. For the purposes
|
||||
of printing enclosing datatypes, a symbol is @tech{quotable}.
|
||||
|
||||
@section{Printing Numbers}
|
||||
@section[#:tag "print-number"]{Printing Numbers}
|
||||
|
||||
A @tech{number} prints the same way in @racket[write], @racket[display], and
|
||||
@racket[print] modes. For the purposes of printing enclosing
|
||||
|
@ -126,7 +126,7 @@ determined by @racket[numerator] and @racket[denominator]).
|
|||
A negative @tech{exact number} prints with a @litchar{-} prefix on the
|
||||
printed form of the number's exact negation.
|
||||
|
||||
@section{Printing Booleans}
|
||||
@section[#:tag "print-booleans"]{Printing Booleans}
|
||||
|
||||
The @tech{boolean} constant @racket[#t] prints as @litchar{#true} or @litchar{#t} in
|
||||
all modes (@racket[display], @racket[write], and @racket[print]),
|
||||
|
@ -219,7 +219,7 @@ always @tech{quotable}, a pair is @tech{quotable} when its
|
|||
@racket[car] and @racket[cdr] are @tech{quotable}, and a mutable list
|
||||
is never @tech{quotable}.
|
||||
|
||||
@section{Printing Strings}
|
||||
@section[#:tag "print-string"]{Printing Strings}
|
||||
|
||||
All @tech{strings} @racket[display] as their literal character sequences.
|
||||
|
||||
|
@ -419,7 +419,7 @@ When the @racket[print-box] parameter is set to @racket[#f], a box
|
|||
prints as @litchar{#<box>} and counts as @tech{quotable}.
|
||||
|
||||
|
||||
@section{Printing Characters}
|
||||
@section[#:tag "print-character"]{Printing Characters}
|
||||
|
||||
@tech{Characters} with the special names described in
|
||||
@secref["parse-character"] @racket[write] and @racket[print] using the
|
||||
|
@ -439,7 +439,7 @@ For the purposes of printing enclosing datatypes, a character is
|
|||
@tech{quotable}.
|
||||
|
||||
|
||||
@section{Printing Keywords}
|
||||
@section[#:tag "print-keyword"]{Printing Keywords}
|
||||
|
||||
@tech{Keywords} @racket[write], @racket[print], and @racket[display] the same
|
||||
as symbols (see @secref["print-symbol"]) except with a leading
|
||||
|
@ -452,7 +452,7 @@ For the purposes of printing enclosing datatypes, a keyword is
|
|||
@tech{quotable}.
|
||||
|
||||
|
||||
@section{Printing Regular Expressions}
|
||||
@section[#:tag "print-regexp"]{Printing Regular Expressions}
|
||||
|
||||
@tech{Regexp values} @racket[write], @racket[display], and @racket[print]
|
||||
starting with @litchar{#px} (for @racket[pregexp]-based regexps) or
|
||||
|
|
|
@ -54,6 +54,9 @@ compatible with Perl. In addition, Racket constants written with
|
|||
@litchar{#rx} or @litchar{#px} (see @secref["reader"]) produce
|
||||
compiled regexp values.
|
||||
|
||||
A literal or printed regular expression starts with @litchar{#rx} or
|
||||
@litchar{#px}. @see-read-print["regexp"]{regular expressions}
|
||||
|
||||
The internal size of a regexp value is limited to 32 kilobytes; this
|
||||
limit roughly corresponds to a source string with 32,000 literal
|
||||
characters or 5,000 operators.
|
||||
|
|
|
@ -22,6 +22,8 @@ A string can be used as a single-valued sequence (see
|
|||
@secref["sequences"]). The characters of the string serve as elements
|
||||
of the sequence. See also @racket[in-string].
|
||||
|
||||
@see-read-print["string"]{strings}
|
||||
|
||||
See also: @racket[immutable?], @racket[symbol->string],
|
||||
@racket[bytes->string/utf-8].
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@ A vector can be used as a single-valued sequence (see
|
|||
@secref["sequences"]). The elements of the vector serve as elements
|
||||
of the sequence. See also @racket[in-vector].
|
||||
|
||||
A literal or printed vector starts with @litchar{#(}, optionally with
|
||||
a number between the @litchar{#} and
|
||||
@litchar{(}. @see-read-print["vector" #:print "vectors"]{vectors}
|
||||
|
||||
@defproc[(vector? [v any/c]) boolean?]{
|
||||
|
||||
Returns @racket[#t] if @racket[v] is a vector, @racket[#f] otherwise.}
|
||||
|
|
Loading…
Reference in New Issue
Block a user