The Scribble reader was improved to make it pull out the syntax

punctuations outside of the form, as it does with quote punctuations.
So things like this

  #, @foo{...}

that required the space to make the @foo read as a scribble form are
now better written as

  @#,foo{...}

This changes all such occurrences.  (In case you see this change in
your files and are worried that there might be changes: I mechanically
verified that the result of `read'ing the modified files is identical
to the previous version.)

svn: r15111
This commit is contained in:
Eli Barzilay 2009-06-07 10:12:32 +00:00
parent 575a348e8a
commit 4288c6c2c7
91 changed files with 745 additions and 742 deletions

View File

@ -25,11 +25,11 @@ Abstraktion - fortgeschritten} that goes with the German textbook
string string
character character
(quoted ...) (quoted ...)
#, @elem{@schemevalfont{'}@scheme[quoted]}] @#,elem{@schemevalfont{'}@scheme[quoted]}]
) )
( (
(set! id expr) (set! id expr)
(code:line #, @elem{@schemevalfont{'}@scheme[quoted]} (code:comment #, @seclink["advanced-quote"]{Quote-Literal})) (code:line @#,elem{@schemevalfont{'}@scheme[quoted]} (code:comment @#,seclink["advanced-quote"]{Quote-Literal}))
) )
] ]

View File

@ -67,10 +67,10 @@ Schreiben Sie dann eine Datendefinition, die mit folgenden Worten
anfängt: anfängt:
@schemeblock[ @schemeblock[
(code:comment #, @t{Ein @scheme[x] besteht aus / hat:}) (code:comment @#,t{Ein @scheme[x] besteht aus / hat:})
(code:comment #, @t{- @scheme[#,(elem (scheme Feld) (subscript "1"))] @scheme[(#,(elem (scheme ctr) (subscript "1")))]}) (code:comment @#,t{- @scheme[#,(elem (scheme Feld) (subscript "1"))] @scheme[(#,(elem (scheme ctr) (subscript "1")))]})
(code:comment #, @t{...}) (code:comment @#,t{...})
(code:comment #, @t{- @scheme[#,(elem (scheme Feld) (subscript "n"))] @scheme[(#,(elem (scheme ctr) (subscript "n")))]}) (code:comment @#,t{- @scheme[#,(elem (scheme Feld) (subscript "n"))] @scheme[(#,(elem (scheme ctr) (subscript "n")))]})
] ]
Dabei ist @scheme[x] ein umgangssprachlicher Name für die Sorte Dabei ist @scheme[x] ein umgangssprachlicher Name für die Sorte
@ -125,11 +125,11 @@ Wenn bei der Datenanalyse gemischte Daten auftauchen, schreiben Sie
eine Datendefinition der Form: eine Datendefinition der Form:
@schemeblock[ @schemeblock[
(code:comment #, @t{Ein @scheme[x] ist eins der Folgenden:}) (code:comment @#,t{Ein @scheme[x] ist eins der Folgenden:})
(code:comment #, @t{- @elem[(scheme Sorte) (subscript "1")] (@elem[(scheme ctr) (subscript "1")])}) (code:comment @#,t{- @elem[(scheme Sorte) (subscript "1")] (@elem[(scheme ctr) (subscript "1")])})
(code:comment #, @t{...}) (code:comment @#,t{...})
(code:comment #, @t{- @elem[(scheme Sorte) (subscript "n")] (@elem[(scheme ctr) (subscript "n")])}) (code:comment @#,t{- @elem[(scheme Sorte) (subscript "n")] (@elem[(scheme ctr) (subscript "n")])})
(code:comment #, @t{Name: @scheme[ctr]}) (code:comment @#,t{Name: @scheme[ctr]})
] ]
Dabei sind die @elem[(scheme Sorte) (subscript "i")] umgangssprachliche Namen Dabei sind die @elem[(scheme Sorte) (subscript "i")] umgangssprachliche Namen

View File

@ -37,18 +37,18 @@ Dieses teachpack definiert Prozeduren für lineare Algebra und 3D-Rendering:
Zum Beispiel: Zum Beispiel:
@schemeblock[ @schemeblock[
(code:comment #, @t{scene-data (simple box example)}) (code:comment @#,t{scene-data (simple box example)})
(define box (define box
(create-box 1.0 1.0 1.0 "brown")) (create-box 1.0 1.0 1.0 "brown"))
(code:comment #, @t{screen}) (code:comment @#,t{screen})
(define screenWidth 320) (define screenWidth 320)
(define screenHeight 240) (define screenHeight 240)
(code:comment #, @t{camera}) (code:comment @#,t{camera})
(define pos (make-vec3 5 5 3)) (define pos (make-vec3 5 5 3))
(define lookat (make-vec3 0 0 0)) (define lookat (make-vec3 0 0 0))
(define camera (define camera
(create-camera-matrix pos lookat 70.0 screenWidth screenHeight)) (create-camera-matrix pos lookat 70.0 screenWidth screenHeight))
(code:comment #, @t{render image}) (code:comment @#,t{render image})
(render-scene screenWidth screenHeight box camera) (render-scene screenWidth screenHeight box camera)
] ]

View File

@ -26,49 +26,49 @@
expr expr
test-case test-case
#;library-require] #;library-require]
[definition #, @scheme[(define id expr)] [definition @#,scheme[(define id expr)]
#, @scheme[(define-record-procedures id id id (id (... ...)))] @#,scheme[(define-record-procedures id id id (id (... ...)))]
#, @scheme[(define-record-procedures-parametric (id id (... ...)) id id (id (... ...)))] @#,scheme[(define-record-procedures-parametric (id id (... ...)) id id (id (... ...)))]
#, @scheme[(define-contract id contract)] @#,scheme[(define-contract id contract)]
#, @scheme[(: id contract)] @#,scheme[(: id contract)]
def-rule ...] def-rule ...]
prod ... prod ...
[expr #, @scheme[(code:line (expr expr (... ...)) (code:comment #, @seclink["application"]{Prozedurapplikation}))] [expr @#,scheme[(code:line (expr expr (... ...)) (code:comment @#,seclink["application"]{Prozedurapplikation}))]
#, @scheme[#t] @#,scheme[#t]
#, @scheme[#f] @#,scheme[#f]
#, @scheme[number] @#,scheme[number]
#, @scheme[string] @#,scheme[string]
#, @scheme[(lambda (id (... ...)) expr)] @#,scheme[(lambda (id (... ...)) expr)]
#, @scheme[(code:line id (code:comment #, @seclink["id"]{Bezeichner}))] @#,scheme[(code:line id (code:comment @#,seclink["id"]{Bezeichner}))]
#, @scheme[(cond (expr expr) (expr expr) (... ...))] @#,scheme[(cond (expr expr) (expr expr) (... ...))]
#, @scheme[(cond (expr expr) (... ...) (else expr))] @#,scheme[(cond (expr expr) (... ...) (else expr))]
#, @scheme[(if expr expr)] @#,scheme[(if expr expr)]
#, @scheme[(and expr (... ...))] @#,scheme[(and expr (... ...))]
#, @scheme[(or expr (... ...))] @#,scheme[(or expr (... ...))]
#, @scheme[(let ((id expr) (... ...)) expr)] @#,scheme[(let ((id expr) (... ...)) expr)]
#, @scheme[(letrec ((id expr) (... ...)) expr)] @#,scheme[(letrec ((id expr) (... ...)) expr)]
#, @scheme[(let* ((id expr) (... ...)) expr) ] @#,scheme[(let* ((id expr) (... ...)) expr) ]
#, @scheme[(begin expr expr (... ...))] @#,scheme[(begin expr expr (... ...))]
expr-rule ...] expr-rule ...]
[contract id [contract id
#, @scheme[(predicate expr)] @#,scheme[(predicate expr)]
#, @scheme[(one-of expr (... ...))] @#,scheme[(one-of expr (... ...))]
#, @scheme[(mixed contract (... ...))] @#,scheme[(mixed contract (... ...))]
#, @scheme[(code:line (contract (... ...) -> contract) (code:comment #, @seclink["proc-contract"]{Prozedur-Vertrag}))] @#,scheme[(code:line (contract (... ...) -> contract) (code:comment @#,seclink["proc-contract"]{Prozedur-Vertrag}))]
#, @scheme[(list contract)] @#,scheme[(list contract)]
#, @scheme[(code:line %a %b %c (code:comment #, @seclink["contract-variable"]{Vertrags-Variable}))] @#,scheme[(code:line %a %b %c (code:comment @#,seclink["contract-variable"]{Vertrags-Variable}))]
#, @scheme[(combined contract (... ...))] @#,scheme[(combined contract (... ...))]
#, @scheme[(property expr contract)] @#,scheme[(property expr contract)]
] ]
[test-case #, @scheme[(check-expect expr expr)] [test-case @#,scheme[(check-expect expr expr)]
#, @scheme[(check-within expr expr expr)] @#,scheme[(check-within expr expr expr)]
#, @scheme[(check-error expr expr)]] @#,scheme[(check-error expr expr)]]
#;(... #;(...
[library-require #, @scheme[(require string)] [library-require @#,scheme[(require string)]
#, @scheme[(require (lib string string ...))] @#,scheme[(require (lib string string ...))]
#, @scheme[(require (planet string package))]]) @#,scheme[(require (planet string package))]])
(... (...
[package #, @scheme[(string string number number)]]))) [package @#,scheme[(string string number number)]])))
(define prim-nonterms (define prim-nonterms
(make-splice (make-splice

View File

@ -159,10 +159,10 @@ space for each @scheme[field-id] within the instance is deallocated.
#:eval objc-eval #:eval objc-eval
(eval:alts (eval:alts
(define-objc-class MyView NSView (define-objc-class MyView NSView
[bm] (code:comment #, @elem{<- one field}) [bm] (code:comment @#,elem{<- one field})
(- _scheme (swapBitwmap: [_scheme new-bm]) (- _scheme (swapBitwmap: [_scheme new-bm])
(begin0 bm (set! bm new-bm))) (begin0 bm (set! bm new-bm)))
(- _void (drawRect: [#, @schemeidfont{_NSRect} exposed-rect]) (- _void (drawRect: [@#,schemeidfont{_NSRect} exposed-rect])
(super-tell drawRect: exposed-rect) (super-tell drawRect: exposed-rect)
(draw-bitmap-region bm exposed-rect)) (draw-bitmap-region bm exposed-rect))
(- _void (dealloc) (- _void (dealloc)

View File

@ -616,20 +616,20 @@ result of @scheme[(viewport-dc viewport)], too.}
@schemeblock[ @schemeblock[
(open-graphics) (open-graphics)
(code:comment #, @t{nothing appears to happen, but the library is initialized...}) (code:comment @#,t{nothing appears to happen, but the library is initialized...})
(define w (open-viewport "practice" 300 300)) (define w (open-viewport "practice" 300 300))
(code:comment #, @t{viewport window appears}) (code:comment @#,t{viewport window appears})
((draw-line w) (make-posn 30 30) (make-posn 100 100)) ((draw-line w) (make-posn 30 30) (make-posn 100 100))
(code:comment #, @t{line appears}) (code:comment @#,t{line appears})
(close-viewport w) (close-viewport w)
(code:comment #, @t{viewport disappears}) (code:comment @#,t{viewport disappears})
(close-graphics) (close-graphics)
(code:comment #, @t{again, nothing appears to happen, but}) (code:comment @#,t{again, nothing appears to happen, but})
(code:comment #, @t{unclosed viewports (if any) would disappear}) (code:comment @#,t{unclosed viewports (if any) would disappear})
] ]
@section{A More Complicated Example} @section{A More Complicated Example}
@ -640,21 +640,21 @@ viewport:
@schemeblock[ @schemeblock[
(open-graphics) (open-graphics)
(let* ((code:comment #, @t{@scheme[w1] and @scheme[w2] are viewports for different windows}) (let* ((code:comment @#,t{@scheme[w1] and @scheme[w2] are viewports for different windows})
[w1 (open-viewport "viewport 1" 300 300)] [w1 (open-viewport "viewport 1" 300 300)]
[w2 (open-viewport "viewport 2" 200 500)] [w2 (open-viewport "viewport 2" 200 500)]
(code:comment #, @t{@scheme[d1] and @scheme[d2] draw lines in different viewports}) (code:comment @#,t{@scheme[d1] and @scheme[d2] draw lines in different viewports})
[d1 (draw-line w1)] [d1 (draw-line w1)]
[d2 (draw-line w2)]) [d2 (draw-line w2)])
(code:comment #, @t{draws a line in viewport labeled ``viewport 1''}) (code:comment @#,t{draws a line in viewport labeled ``viewport 1''})
(d1 (make-posn 100 5) (make-posn 5 100)) (d1 (make-posn 100 5) (make-posn 5 100))
(code:comment #, @t{draws a line in viewport labeled ``viewport 2''}) (code:comment @#,t{draws a line in viewport labeled ``viewport 2''})
(d2 (make-posn 100 100) (make-posn 101 400))) (d2 (make-posn 100 100) (make-posn 101 400)))
(code:comment #, @t{we no longer have access to viewports 1 and 2,}) (code:comment @#,t{we no longer have access to viewports 1 and 2,})
(code:comment #, @t{since their descriptors did not escape the @scheme[let]}) (code:comment @#,t{since their descriptors did not escape the @scheme[let]})
(close-graphics) (close-graphics)
(code:comment #, @t{removes the viewports}) (code:comment @#,t{removes the viewports})
] ]
@section{Protecting Graphics Operations} @section{Protecting Graphics Operations}
@ -666,12 +666,12 @@ programmer should use @scheme[dynamic-wind:]
@schemeblock[ @schemeblock[
(let ([w (open-viewport "hello" 100 100)]) (let ([w (open-viewport "hello" 100 100)])
(dynamic-wind (dynamic-wind
(code:comment #, @t{what we want to happen first: nothing}) (code:comment @#,t{what we want to happen first: nothing})
void void
(code:comment #, @t{the main program (errors constrained to this piece)}) (code:comment @#,t{the main program (errors constrained to this piece)})
(lambda () (draw-pixel 13)) (code:comment #, @t{an error}) (lambda () (draw-pixel 13)) (code:comment @#,t{an error})
(code:comment #, @t{what we would like to happen, whether the main program}) (code:comment @#,t{what we would like to happen, whether the main program})
(code:comment #, @t{finishes normally or not}) (code:comment @#,t{finishes normally or not})
(lambda () (close-viewport w)))) (lambda () (close-viewport w))))
] ]

View File

@ -50,9 +50,9 @@ Reads HTML from a port, producing an @xexpr compatible with the
@def+int[ @def+int[
(module html-example scheme (module html-example scheme
(code:comment #, @t{Some of the symbols in @schememodname[html] and @schememodname[xml] conflict with}) (code:comment @#,t{Some of the symbols in @schememodname[html] and @schememodname[xml] conflict with})
(code:comment #, @t{each other and with scheme/base language, so we prefix}) (code:comment @#,t{each other and with scheme/base language, so we prefix})
(code:comment #, @t{to avoid namespace conflict.}) (code:comment @#,t{to avoid namespace conflict.})
(require (prefix-in h: html) (require (prefix-in h: html)
(prefix-in x: xml)) (prefix-in x: xml))
@ -64,8 +64,8 @@ Reads HTML from a port, producing an @xexpr compatible with the
"<p>Hello world</p><p><b>Testing</b>!</p>" "<p>Hello world</p><p><b>Testing</b>!</p>"
"</body></html>")))) "</body></html>"))))
(code:comment #, @t{extract-pcdata: html-content -> (listof string)}) (code:comment @#,t{extract-pcdata: html-content -> (listof string)})
(code:comment #, @t{Pulls out the pcdata strings from some-content.}) (code:comment @#,t{Pulls out the pcdata strings from some-content.})
(define (extract-pcdata some-content) (define (extract-pcdata some-content)
(cond [(x:pcdata? some-content) (cond [(x:pcdata? some-content)
(list (x:pcdata-string some-content))] (list (x:pcdata-string some-content))]
@ -74,8 +74,8 @@ Reads HTML from a port, producing an @xexpr compatible with the
[else [else
(extract-pcdata-from-element some-content)])) (extract-pcdata-from-element some-content)]))
(code:comment #, @t{extract-pcdata-from-element: html-element -> (listof string)}) (code:comment @#,t{extract-pcdata-from-element: html-element -> (listof string)})
(code:comment #, @t{Pulls out the pcdata strings from an-html-element.}) (code:comment @#,t{Pulls out the pcdata strings from an-html-element.})
(define (extract-pcdata-from-element an-html-element) (define (extract-pcdata-from-element an-html-element)
(match an-html-element (match an-html-element
[(struct h:html-full (attributes content)) [(struct h:html-full (attributes content))

View File

@ -45,7 +45,7 @@ can be used to write lazy code. To write lazy code, simply use
@schememod[ @schememod[
lazy lazy
... #, @elem{lazy code here}...] ... @#,elem{lazy code here}...]
Function applications are delayed, and promises are automatically Function applications are delayed, and promises are automatically
forced. The language provides bindings that are equivalent to most of forced. The language provides bindings that are equivalent to most of

View File

@ -34,11 +34,11 @@ little setup program (as an executable) in your distribution:
(require mzlib/runtime-path (require mzlib/runtime-path
mzlib/process) mzlib/process)
(code:comment #, @t{Ensure that DLLs are included with the distribution:}) (code:comment @#,t{Ensure that DLLs are included with the distribution:})
(define-runtime-path myspage-dll '(so "myspage")) (define-runtime-path myspage-dll '(so "myspage"))
(define-runtime-path myssink-dll '(so "myssink")) (define-runtime-path myssink-dll '(so "myssink"))
(code:comment #, @t{Register the DLLs:}) (code:comment @#,t{Register the DLLs:})
(define regsvr32 (define regsvr32
(path->string (find-executable-path "regsvr32.exe" #f))) (path->string (find-executable-path "regsvr32.exe" #f)))
(system* regsvr32 (path->string myspage-dll)) (system* regsvr32 (path->string myspage-dll))

View File

@ -117,7 +117,7 @@ The same binding as @scheme[#%app]. (This binding was not present in
([head id ([head id
(head args)] (head args)]
[args (code:line arg-id ...) [args (code:line arg-id ...)
(code:line arg-id ... #, @schemeparenfont{.} rest-id)])]{ (code:line arg-id ... @#,schemeparenfont{.} rest-id)])]{
Like @|base-define| in @schememodname[scheme/base], but without Like @|base-define| in @schememodname[scheme/base], but without
support for keyword arguments or optional arguments.} support for keyword arguments or optional arguments.}

View File

@ -112,7 +112,7 @@ Raised for errors when handling cookies.}
Produces Produces
@schemeblock[ @schemeblock[
#, @schemeresultfont{"foo=bar; Max-Age=3600; Path=/servlets; Version=1"} @#,schemeresultfont{"foo=bar; Max-Age=3600; Path=/servlets; Version=1"}
] ]
To use this output in a ``regular'' CGI, instead of the last line use: To use this output in a ``regular'' CGI, instead of the last line use:

View File

@ -381,10 +381,10 @@ message-state changes (so they will not show up through
@examples[ @examples[
(eval:alts (imap-store imap '+ '(1 2 3) (list (symbol->imap-flag 'deleted))) (eval:alts (imap-store imap '+ '(1 2 3) (list (symbol->imap-flag 'deleted)))
(void)) (void))
(code:comment #, @t{marks the first three messages to be deleted}) (code:comment @#,t{marks the first three messages to be deleted})
(eval:alts (imap-expunge imap) (void)) (eval:alts (imap-expunge imap) (void))
(code:comment #, @t{permanently removes the first three messages (and possibly}) (code:comment @#,t{permanently removes the first three messages (and possibly})
(code:comment #, @t{others) from the currently-selected mailbox}) (code:comment @#,t{others) from the currently-selected mailbox})
]} ]}

View File

@ -175,7 +175,7 @@ Raised when the server produces a mal-formed response.}
"Status: RO") "Status: RO")
("some body" "text" "goes" "." "here" "." "") ("some body" "text" "goes" "." "here" "." "")
#,pt (get-unique-id/single c 205) #,pt (get-unique-id/single c 205)
#, @schemeerror{no message numbered 205 available for unique id} @#,schemeerror{no message numbered 205 available for unique id}
#,pt (list-tail (get-unique-id/all c) 194) #,pt (list-tail (get-unique-id/all c) 194)
((195 . "e24d13c7ef050000") (196 . "3ad2767070050000")) ((195 . "e24d13c7ef050000") (196 . "3ad2767070050000"))
#,pt (get-unique-id/single c 196) #,pt (get-unique-id/single c 196)

View File

@ -31,7 +31,7 @@ See also @scheme[tcp-redirect] and @scheme[make-ssl-tcp@].
[max-allow-wait exact-nonnegative-integer? 4] [max-allow-wait exact-nonnegative-integer? 4]
[reuse? any/c #f] [reuse? any/c #f]
[hostname (or/c string? false/c) #f]) [hostname (or/c string? false/c) #f])
#, @sigelem[tcp^ tcp-listener?]]{ @#,sigelem[tcp^ tcp-listener?]]{
Like @scheme[tcp-listen] from @schememodname[scheme/tcp].} Like @scheme[tcp-listen] from @schememodname[scheme/tcp].}
@ -58,21 +58,21 @@ Like @scheme[tcp-connect] from @schememodname[scheme/tcp].}
Like @scheme[tcp-connect/enable-break] from @schememodname[scheme/tcp].} Like @scheme[tcp-connect/enable-break] from @schememodname[scheme/tcp].}
@defproc[(tcp-accept [listener #, @sigelem[tcp^ tcp-listener?]]) @defproc[(tcp-accept [listener @#,sigelem[tcp^ tcp-listener?]])
(values input-port? output-port?)]{ (values input-port? output-port?)]{
Like @scheme[tcp-accept] from @schememodname[scheme/tcp].} Like @scheme[tcp-accept] from @schememodname[scheme/tcp].}
@defproc[(tcp-accept/enable-break [listener #, @sigelem[tcp^ tcp-listener?]]) @defproc[(tcp-accept/enable-break [listener @#,sigelem[tcp^ tcp-listener?]])
(values input-port? output-port?)]{ (values input-port? output-port?)]{
Like @scheme[tcp-accept/enable-break] from @schememodname[scheme/tcp].} Like @scheme[tcp-accept/enable-break] from @schememodname[scheme/tcp].}
@defproc[(tcp-accept-ready? [listener #, @sigelem[tcp^ tcp-listener?]]) boolean?]{ @defproc[(tcp-accept-ready? [listener @#,sigelem[tcp^ tcp-listener?]]) boolean?]{
Like @scheme[tcp-accept-ready?] from @schememodname[scheme/tcp].} Like @scheme[tcp-accept-ready?] from @schememodname[scheme/tcp].}
@defproc[(tcp-close [listener #, @sigelem[tcp^ tcp-listener?]]) void?]{ @defproc[(tcp-close [listener @#,sigelem[tcp^ tcp-listener?]]) void?]{
Like @scheme[tcp-close] from @schememodname[scheme/tcp].} Like @scheme[tcp-close] from @schememodname[scheme/tcp].}

View File

@ -141,19 +141,19 @@ use/recognize only of the separators.
@examples[ @examples[
#:eval uri-codec-eval #:eval uri-codec-eval
(define ex '((x . "foo") (y . "bar") (z . "baz"))) (define ex '((x . "foo") (y . "bar") (z . "baz")))
(code:line (current-alist-separator-mode 'amp) (code:comment #, @t{try @scheme['amp]...})) (code:line (current-alist-separator-mode 'amp) (code:comment @#,t{try @scheme['amp]...}))
(form-urlencoded->alist "x=foo&y=bar&z=baz") (form-urlencoded->alist "x=foo&y=bar&z=baz")
(form-urlencoded->alist "x=foo;y=bar;z=baz") (form-urlencoded->alist "x=foo;y=bar;z=baz")
(alist->form-urlencoded ex) (alist->form-urlencoded ex)
(code:line (current-alist-separator-mode 'semi) (code:comment #, @t{try @scheme['semi]...})) (code:line (current-alist-separator-mode 'semi) (code:comment @#,t{try @scheme['semi]...}))
(form-urlencoded->alist "x=foo;y=bar;z=baz") (form-urlencoded->alist "x=foo;y=bar;z=baz")
(form-urlencoded->alist "x=foo&y=bar&z=baz") (form-urlencoded->alist "x=foo&y=bar&z=baz")
(alist->form-urlencoded ex) (alist->form-urlencoded ex)
(code:line (current-alist-separator-mode 'amp-or-semi) (code:comment #, @t{try @scheme['amp-or-semi]...})) (code:line (current-alist-separator-mode 'amp-or-semi) (code:comment @#,t{try @scheme['amp-or-semi]...}))
(form-urlencoded->alist "x=foo&y=bar&z=baz") (form-urlencoded->alist "x=foo&y=bar&z=baz")
(form-urlencoded->alist "x=foo;y=bar;z=baz") (form-urlencoded->alist "x=foo;y=bar;z=baz")
(alist->form-urlencoded ex) (alist->form-urlencoded ex)
(code:line (current-alist-separator-mode 'semi-or-amp) (code:comment #, @t{try @scheme['semi-or-amp]...})) (code:line (current-alist-separator-mode 'semi-or-amp) (code:comment @#,t{try @scheme['semi-or-amp]...}))
(form-urlencoded->alist "x=foo&y=bar&z=baz") (form-urlencoded->alist "x=foo&y=bar&z=baz")
(form-urlencoded->alist "x=foo;y=bar;z=baz") (form-urlencoded->alist "x=foo;y=bar;z=baz")
(alist->form-urlencoded ex) (alist->form-urlencoded ex)

View File

@ -458,7 +458,7 @@ the right choice when using @scheme[lexer] in other situations.
Like @scheme[define-tokens], except a each token constructor Like @scheme[define-tokens], except a each token constructor
@schemeidfont{token-}@scheme[token-id] takes no arguments and returns @schemeidfont{token-}@scheme[token-id] takes no arguments and returns
@scheme[(#, @scheme[quote] token-id)].} @scheme[(@#,scheme[quote] token-id)].}
@defproc[(token-name [t (or/c token? symbol?)]) symbol?]{ @defproc[(token-name [t (or/c token? symbol?)]) symbol?]{
@ -494,7 +494,7 @@ the right choice when using @scheme[lexer] in other situations.
(tokens group-id ...) (tokens group-id ...)
(start non-terminal-id ...) (start non-terminal-id ...)
(end token-id ...) (end token-id ...)
(#, @schemeidfont{error} expr) (@#,schemeidfont{error} expr)
(precs (assoc token-id ...) ...) (precs (assoc token-id ...) ...)
(src-pos) (src-pos)
(suppress) (suppress)
@ -574,7 +574,7 @@ the right choice when using @scheme[lexer] in other situations.
that parses entire lines individually.} that parses entire lines individually.}
@item{@scheme[(#, @schemeidfont{error} expr)] @item{@scheme[(@#,schemeidfont{error} expr)]
The @scheme[expr] should evaluate to a function which will be The @scheme[expr] should evaluate to a function which will be
executed for its side-effect whenever the parser encounters an executed for its side-effect whenever the parser encounters an

View File

@ -178,7 +178,7 @@ are searched in order, and before the installation's collections.
The @schememodname[r6rs] language is usually used in the form The @schememodname[r6rs] language is usually used in the form
@schememetafont{#!}@schememodname[r6rs], which is equivalent to @schememetafont{#!}@schememodname[r6rs], which is equivalent to
@scheme[#, @hash-lang[] #, @schememodname[r6rs]] and is also valid @scheme[@#,hash-lang[] @#,schememodname[r6rs]] and is also valid
@|r6rs| syntax. @|r6rs| syntax.
The @schememodname[r6rs] module language provides only a The @schememodname[r6rs] module language provides only a
@ -259,13 +259,13 @@ applied to each symbol before concatenating them:
Examples (assuming a typical PLT Scheme installation): Examples (assuming a typical PLT Scheme installation):
@schemeblock[ @schemeblock[
(rnrs io simple (6)) #, @elem{means} (lib "rnrs/io/simple-6.ss") (rnrs io simple (6)) @#,elem{means} (lib "rnrs/io/simple-6.ss")
(rnrs) #, @elem{means} (lib "rnrs/main-6.ss") (rnrs) @#,elem{means} (lib "rnrs/main-6.ss")
(rnrs main) #, @elem{means} (lib "rnrs/main_.ss") (rnrs main) @#,elem{means} (lib "rnrs/main_.ss")
(rnrs (6)) #, @elem{means} (lib "rnrs/main-6.ss") (rnrs (6)) @#,elem{means} (lib "rnrs/main-6.ss")
(scheme base) #, @elem{means} (lib "scheme/base.ss") (scheme base) @#,elem{means} (lib "scheme/base.ss")
(achtung!) #, @elem{means} (lib "achtung%21/main.ss") (achtung!) @#,elem{means} (lib "achtung%21/main.ss")
(funco new-λ) #, @elem{means} (lib "funco/new-%ce%bb.ss") (funco new-λ) @#,elem{means} (lib "funco/new-%ce%bb.ss")
] ]

View File

@ -282,7 +282,7 @@ Multiple ellipses are allowed. For example, this @|pattern|:
matches this sexpression: matches this sexpression:
@schemeblock[(#, @|tttterm| (a a))] @schemeblock[(@#,tttterm (a a))]
three different ways. One where the first @tt{a} in the @pattern three different ways. One where the first @tt{a} in the @pattern
matches nothing, and the second matches both of the matches nothing, and the second matches both of the
@ -302,7 +302,7 @@ As an example, this @|pattern|:
only matches this sexpression: only matches this sexpression:
@schemeblock[(#, @|tttterm| (a a))] @schemeblock[(@#,tttterm (a a))]
one way, with each named @pattern matching a single a. Unlike one way, with each named @pattern matching a single a. Unlike
the above, the two @|pattern|s with mismatched lengths is ruled the above, the two @|pattern|s with mismatched lengths is ruled
@ -318,7 +318,7 @@ Thus, with the @|pattern|:
and the expression and the expression
@schemeblock[(#, @|tttterm| (a a))] @schemeblock[(@#,tttterm (a a))]
two matches occur, one where @tt{x} is bound to @scheme['()] and two matches occur, one where @tt{x} is bound to @scheme['()] and
@tt{y} is bound to @scheme['(a a)] and one where @tt{x} is bound to @tt{y} is bound to @scheme['(a a)] and one where @tt{x} is bound to
@ -328,8 +328,8 @@ bound to @scheme['()].
} }
] ]
@defform*[[(redex-match lang #, @|ttpattern| any) @defform*[[(redex-match lang @#,ttpattern any)
(redex-match lang #, @|ttpattern|)]]{ (redex-match lang @#,ttpattern)]]{
If @scheme[redex-match] receives three arguments, it If @scheme[redex-match] receives three arguments, it
matches the pattern (in the language) against its third matches the pattern (in the language) against its third
@ -446,7 +446,7 @@ them.}
produces the boolean or the string.} produces the boolean or the string.}
] ]
@defform[(term #, @|tttterm|)]{ @defform[(term @#,tttterm)]{
This form is used for construction of a term. This form is used for construction of a term.
@ -508,7 +508,7 @@ Redex's full pattern matching facilities, see @scheme[term-match] and
} }
@defform[(term-match language [#, @|ttpattern| expression] ...)]{ @defform[(term-match language [@#,ttpattern expression] ...)]{
This produces a procedure that accepts term (or quoted) This produces a procedure that accepts term (or quoted)
expressions and checks them against each pattern. The expressions and checks them against each pattern. The
@ -522,7 +522,7 @@ compiled in an effort to speed up matching. Using the procedural
result multiple times to avoid compiling the patterns multiple times. result multiple times to avoid compiling the patterns multiple times.
} }
@defform[(term-match/single language [#, @|ttpattern| expression] ...)]{ @defform[(term-match/single language [@#,ttpattern expression] ...)]{
This produces a procedure that accepts term (or quoted) This produces a procedure that accepts term (or quoted)
expressions and checks them against each pattern. The expressions and checks them against each pattern. The
@ -578,7 +578,7 @@ all non-GUI portions of Redex) and also exported by
@schememodname[redex] (which includes all of Redex). @schememodname[redex] (which includes all of Redex).
@defform/subs[(define-language lang-name @defform/subs[(define-language lang-name
(non-terminal-spec #, @|ttpattern| ...) (non-terminal-spec @#,ttpattern ...)
...) ...)
([non-terminal-spec symbol (symbol ...)])]{ ([non-terminal-spec symbol (symbol ...)])]{
@ -613,7 +613,7 @@ variables, @scheme[c] for the evaluation contexts and @scheme[v] for values.
} }
@defform[(define-extended-language language language @defform[(define-extended-language language language
(non-terminal #, @|ttpattern| ...) (non-terminal @#,ttpattern ...)
...)]{ ...)]{
This form extends a language with some new, replaced, or This form extends a language with some new, replaced, or
@ -671,13 +671,13 @@ all non-GUI portions of Redex) and also exported by
@defform/subs[#:literals (--> fresh side-condition where) @defform/subs[#:literals (--> fresh side-condition where)
(reduction-relation language domain main-arrow reduction-case ...) (reduction-relation language domain main-arrow reduction-case ...)
([domain (code:line) (code:line #:domain #, @|ttpattern|)] ([domain (code:line) (code:line #:domain @#,ttpattern)]
[main-arrow (code:line) (code:line #:arrow arrow)] [main-arrow (code:line) (code:line #:arrow arrow)]
[reduction-case (--> #, @|ttpattern| #, @|tttterm| extras ...)] [reduction-case (--> @#,ttpattern @#,tttterm extras ...)]
[extras name [extras name
(fresh fresh-clause ...) (fresh fresh-clause ...)
(side-condition scheme-expression ...) (side-condition scheme-expression ...)
(where tl-pat #, @|tttterm|)] (where tl-pat @#,tttterm)]
[fresh-clause var ((var1 ...) (var2 ...))] [fresh-clause var ((var1 ...) (var2 ...))]
[tl-pat identifier (tl-pat-ele ...)] [tl-pat identifier (tl-pat-ele ...)]
[tl-pat-ele tl-pat (code:line tl-pat ... (code:comment "a literal ellipsis"))])]{ [tl-pat-ele tl-pat (code:line tl-pat ... (code:comment "a literal ellipsis"))])]{
@ -739,9 +739,9 @@ defines a reduction relation for the lambda-calculus above.
@defform/none[#:literals (with reduction-relation) @defform/none[#:literals (with reduction-relation)
(reduction-relation (reduction-relation
language language
(arrow-var #, @|ttpattern| #, @|tttterm|) ... (arrow-var @#,ttpattern @#,tttterm) ...
with with
[(arrow #, @|ttpattern| #, @|tttterm|) [(arrow @#,ttpattern @#,tttterm)
(arrow-var var var)] ...)]{ (arrow-var var var)] ...)]{
Defines a reduction relation with shortcuts. As above, the Defines a reduction relation with shortcuts. As above, the
@ -881,12 +881,12 @@ all non-GUI portions of Redex) and also exported by
@defform/subs[#:literals (: ->) @defform/subs[#:literals (: ->)
(define-metafunction language-exp (define-metafunction language-exp
contract contract
[(name #, @|ttpattern| ...) #, @|tttterm| extras ...] [(name @#,ttpattern ...) @#,tttterm extras ...]
...) ...)
([contract (code:line) ([contract (code:line)
(code:line id : #, @|ttpattern| ... -> #, @|ttpattern|)] (code:line id : @#,ttpattern ... -> @#,ttpattern)]
[extras (side-condition scheme-expression) [extras (side-condition scheme-expression)
(where tl-pat #, @|tttterm|)] (where tl-pat @#,tttterm)]
[tl-pat identifier (tl-pat-ele ...)] [tl-pat identifier (tl-pat-ele ...)]
[tl-pat-ele tl-pat (code:line tl-pat ... (code:comment "a literal ellipsis"))])]{ [tl-pat-ele tl-pat (code:line tl-pat ... (code:comment "a literal ellipsis"))])]{
@ -965,7 +965,7 @@ match.
@defform[(define-metafunction/extension extending-name language-exp @defform[(define-metafunction/extension extending-name language-exp
contract contract
[(name #, @|ttpattern| ...) #, @|tttterm| (side-condition scheme-expression) ...] [(name @#,ttpattern ...) @#,tttterm (side-condition scheme-expression) ...]
...)]{ ...)]{
This defines a metafunction as an extension of an existing This defines a metafunction as an extension of an existing
@ -974,7 +974,7 @@ patterns were in this definitions, with the name of the
function fixed up to be @scheme[extending-name]. function fixed up to be @scheme[extending-name].
} }
@defform[(in-domain? (metafunction-name #, @|tttterm| ...))]{ @defform[(in-domain? (metafunction-name @#,tttterm ...))]{
Returns @scheme[#t] if the inputs specified to @scheme[metafunction-name] are Returns @scheme[#t] if the inputs specified to @scheme[metafunction-name] are
legtimate inputs according to @scheme[metafunction-name]'s contract, legtimate inputs according to @scheme[metafunction-name]'s contract,
and @scheme[#f] otherwise. and @scheme[#f] otherwise.
@ -1069,7 +1069,7 @@ an association list mapping names to application counts.}
(apply-reduction-relation* equals (term (+ 1 2 3))) (apply-reduction-relation* equals (term (+ 1 2 3)))
(covered-cases coverage)))] (covered-cases coverage)))]
@defform/subs[(generate-term language #, @|ttpattern| size-exp kw-args ...) @defform/subs[(generate-term language @#,ttpattern size-exp kw-args ...)
([kw-args (code:line #:attempts attempts-expr) ([kw-args (code:line #:attempts attempts-expr)
(code:line #:retries retries-expr)]) (code:line #:retries retries-expr)])
#:contracts ([size-expr natural-number/c] #:contracts ([size-expr natural-number/c]
@ -1096,7 +1096,7 @@ argument @scheme[retries-expr] (default @scheme[100]) bounds the number of times
@scheme[generate-term] is unable to produce a satisfying term after @scheme[generate-term] is unable to produce a satisfying term after
@scheme[retries-expr] attempts, it raises an error} @scheme[retries-expr] attempts, it raises an error}
@defform/subs[(redex-check language #, @|ttpattern| property-expr kw-arg ...) @defform/subs[(redex-check language @#,ttpattern property-expr kw-arg ...)
([kw-arg (code:line #:attempts attempts-expr) ([kw-arg (code:line #:attempts attempts-expr)
(code:line #:source metafunction) (code:line #:source metafunction)
(code:line #:source relation-expr) (code:line #:source relation-expr)

View File

@ -399,7 +399,7 @@ but within special boxes that separate explicit I/O from normal
expressions and results. For example, evaluating expressions and results. For example, evaluating
@schemeblock[ @schemeblock[
#, @tt{>} (read) @#,tt{>} (read)
] ]
in the interactions window produces a special box for entering input: in the interactions window produces a special box for entering input:
@ -414,10 +414,10 @@ shows a new prompt, it hides the interaction box. Thus, if you type
as follows: as follows:
@schemeblock[ @schemeblock[
#, @tt{>} (read) @#,tt{>} (read)
#, @ioinputfont{5} @#,ioinputfont{5}
#, @schemeresult[5] @#,schemeresult[5]
#, @tt{>} #, @tt{_} @#,tt{>} @#,tt{_}
] ]
In this case, the first @ioinputfont{5} is the input, and the second In this case, the first @ioinputfont{5} is the input, and the second
@ -440,10 +440,10 @@ and provide the input S-expression @scheme[(1 2)], the interactions
window ultimately appears as follows: window ultimately appears as follows:
@schemeblock[ @schemeblock[
#, @ioinputfont{(1 2)} @#,ioinputfont{(1 2)}
#, @iooutputfont{(1 2)} @#,iooutputfont{(1 2)}
#, @schemeresult[(1 2)] @#,schemeresult[(1 2)]
#, @tt{>} #, @tt{_} @#,tt{>} @#,tt{_}
] ]
In this example, @scheme[display] produces output immediately beneath In this example, @scheme[display] produces output immediately beneath
@ -456,13 +456,13 @@ Entering the same program line-by-line in the interactions window
produces a different-looking result: produces a different-looking result:
@schemeblock[ @schemeblock[
#, @tt{>} (define v (read)) @#,tt{>} (define v (read))
#, @ioinputfont{(1 2)} @#,ioinputfont{(1 2)}
#, @tt{>} (display v) @#,tt{>} (display v)
#, @iooutputfont{(1 2)} @#,iooutputfont{(1 2)}
#, @tt{>} v @#,tt{>} v
#, @schemeresult[(1 2)] @#,schemeresult[(1 2)]
#, @tt{>} #, @tt{_} @#,tt{>} @#,tt{_}
] ]
Depending on the input operation, you may enter more text into an Depending on the input operation, you may enter more text into an
@ -473,31 +473,31 @@ interaction, two values are provided in response to the first
second @scheme[(read)]: second @scheme[(read)]:
@schemeblock[ @schemeblock[
#, @tt{>} (read) @#,tt{>} (read)
#, @ioinputfont{5 6} @#,ioinputfont{5 6}
#, @schemeresult[5] @#,schemeresult[5]
#, @tt{>} (read) @#,tt{>} (read)
#, @schemeresult[6] @#,schemeresult[6]
#, @tt{>} #, @tt{_} @#,tt{>} @#,tt{_}
] ]
The following example illustrates that submitting input with Return The following example illustrates that submitting input with Return
inserts a newline character into the input stream: inserts a newline character into the input stream:
@schemeblock[ @schemeblock[
#, @tt{>} (read) @#,tt{>} (read)
#, @ioinputfont{5} @#,ioinputfont{5}
#, @schemeresult[5] @#,schemeresult[5]
#, @tt{>} (read-char) @#,tt{>} (read-char)
#, @schemeresult[#\newline] @#,schemeresult[#\newline]
#, @tt{>} #, @tt{_} @#,tt{>} @#,tt{_}
] ]
Within a @scheme[#, @hash-lang[] #, @schememodname[scheme]] module, Within a @scheme[@#,hash-lang[] @#,schememodname[scheme]] module,
the results of top-level expression print the same as the results of the results of top-level expression print the same as the results of
an expression entered in the @tech{interactions window}. The reason is an expression entered in the @tech{interactions window}. The reason is
that @scheme[#, @hash-lang[] #, @schememodname[scheme]] explicitly that @scheme[@#,hash-lang[] @#,schememodname[scheme]] explicitly
prints the results of top-level expressions using prints the results of top-level expressions using
@scheme[(current-print)], and DrScheme sets @scheme[(current-print)] @scheme[(current-print)], and DrScheme sets @scheme[(current-print)]
to print values in the same way as for interactions. to print values in the same way as for interactions.

View File

@ -19,7 +19,7 @@ is immediately imported. For example, @scheme[ptr-equal?] can never
cause memory corruption or an invalid memory access, so it is cause memory corruption or an invalid memory access, so it is
immediately available on import. immediately available on import.
Use @scheme[(#, @indexed-scheme[unsafe!])] at the top-level of a Use @scheme[(@#,indexed-scheme[unsafe!])] at the top-level of a
module that imports @schememodname[scheme/foreign] to make unsafe module that imports @schememodname[scheme/foreign] to make unsafe
features accessible. (For additional safety, the @scheme[unsafe!] is features accessible. (For additional safety, the @scheme[unsafe!] is
itself protected; see @secref[#:doc '(lib itself protected; see @secref[#:doc '(lib

View File

@ -211,13 +211,13 @@ For general information on C-level memory management with PLT Scheme,
see @|InsideMzScheme|. see @|InsideMzScheme|.
@defproc[(malloc [bytes-or-type (or/c exact-nonnegative-integer? ctype?)] @defproc[(malloc [bytes-or-type (or/c exact-nonnegative-integer? ctype?)]
[type-or-bytes (or/c exact-nonnegative-integer? ctype?) #, @elem{absent}] [type-or-bytes (or/c exact-nonnegative-integer? ctype?) @#,elem{absent}]
[cptr cpointer? #, @elem{absent}] [cptr cpointer? @#,elem{absent}]
[mode (one-of/c 'nonatomic 'stubborn 'uncollectable [mode (one-of/c 'nonatomic 'stubborn 'uncollectable
'eternal 'interior 'atomic-interior 'eternal 'interior 'atomic-interior
'raw) 'raw)
#, @elem{absent}] @#,elem{absent}]
[fail-mode (one-of/c 'failok) #, @elem{absent}]) [fail-mode (one-of/c 'failok) @#,elem{absent}])
cpointer?]{ cpointer?]{
Allocates a memory block of a specified size using a specified Allocates a memory block of a specified size using a specified
@ -319,7 +319,7 @@ string that you should free. Here is an attempt at creating a suitable type:
@schemeblock[ @schemeblock[
(define bytes/free (define bytes/free
(make-ctype _pointer (make-ctype _pointer
#f (code:comment #, @t{a Scheme bytes can be used as a pointer}) #f (code:comment @#,t{a Scheme bytes can be used as a pointer})
(lambda (x) (lambda (x)
(let ([b (make-byte-string x)]) (let ([b (make-byte-string x)])
(register-finalizer x free) (register-finalizer x free)
@ -336,7 +336,7 @@ for debugging:
@schemeblock[ @schemeblock[
(define bytes/free (define bytes/free
(make-ctype _pointer (make-ctype _pointer
#f (code:comment #, @t{a Scheme bytes can be used as a pointer}) #f (code:comment @#,t{a Scheme bytes can be used as a pointer})
(lambda (x) (lambda (x)
(let ([b (make-byte-string x)]) (let ([b (make-byte-string x)])
(register-finalizer b (register-finalizer b

View File

@ -781,7 +781,7 @@ work:
(define makeB (define makeB
(get-ffi-obj 'makeB "foo.so" (get-ffi-obj 'makeB "foo.so"
(_fun -> (_list-struct (_list-struct _int _byte) _int)))) (_fun -> (_list-struct (_list-struct _int _byte) _int))))
(makeB) (code:comment #, @t{should return @scheme['((1 2) 3)]}) (makeB) (code:comment @#,t{should return @scheme['((1 2) 3)]})
] ]
The problem here is that @cpp{makeB} returns a pointer to the struct rather The problem here is that @cpp{makeB} returns a pointer to the struct rather
@ -801,10 +801,10 @@ define a type for @cpp{A} which makes it possible to use @cpp{makeA}:
(define-cstruct #,(schemeidfont "_A") ([x _int] [y _byte])) (define-cstruct #,(schemeidfont "_A") ([x _int] [y _byte]))
(define makeA (define makeA
(get-ffi-obj 'makeA "foo.so" (get-ffi-obj 'makeA "foo.so"
(_fun -> #,(schemeidfont "_A-pointer")))) (code:comment #, @t{using @schemeidfont{_A} is a memory-corrupting bug!}) (_fun -> #,(schemeidfont "_A-pointer")))) (code:comment @#,t{using @schemeidfont{_A} is a memory-corrupting bug!})
(define a (makeA)) (define a (makeA))
(list a (A-x a) (A-y a)) (list a (A-x a) (A-y a))
(code:comment #, @t{produces an @scheme[A] containing @scheme[1] and @scheme[2]}) (code:comment @#,t{produces an @scheme[A] containing @scheme[1] and @scheme[2]})
] ]
Using @cpp{gety} is also simple: Using @cpp{gety} is also simple:
@ -813,7 +813,7 @@ Using @cpp{gety} is also simple:
(define gety (define gety
(get-ffi-obj 'gety "foo.so" (get-ffi-obj 'gety "foo.so"
(_fun #,(schemeidfont "_A-pointer") -> _byte))) (_fun #,(schemeidfont "_A-pointer") -> _byte)))
(gety a) (code:comment #, @t{produces @scheme[2]}) (gety a) (code:comment @#,t{produces @scheme[2]})
] ]
We now define another C struct for @cpp{B}, and expose @cpp{makeB} We now define another C struct for @cpp{B}, and expose @cpp{makeB}

View File

@ -539,7 +539,7 @@ framework)) @(require (for-label scheme/gui)) @(require
Calls @scheme[(make-object #, @method[frame:editor<%> get-editor%])]. Calls @scheme[(make-object @#,method[frame:editor<%> get-editor%])].
} }
@defmethod*[(((revert) void))]{ @defmethod*[(((revert) void))]{

View File

@ -17,7 +17,7 @@ program on top of the @scheme[scheme/gui] library.
@itemize[ @itemize[
@item{@scheme[(require #, @schememodname[framework])] @item{@scheme[(require @#,schememodname[framework])]
This library provides all of the definitions and syntax This library provides all of the definitions and syntax
described in this manual. described in this manual.
@ -45,19 +45,19 @@ program on top of the @scheme[scheme/gui] library.
@item{ @item{
@bold{Test Suite Engine} @bold{Test Suite Engine}
@scheme[(require #, @schememodname[framework/test])] @scheme[(require @#,schememodname[framework/test])]
This library provides all of the definitions beginning with This library provides all of the definitions beginning with
@scheme[test:] described in this manual. @scheme[test:] described in this manual.
} }
@item{ @bold{GUI Utilities} @item{ @bold{GUI Utilities}
@scheme[(require #, @schememodname[framework/gui-utils])] @scheme[(require @#,schememodname[framework/gui-utils])]
This libraries provides all of the definitions beginning This libraries provides all of the definitions beginning
with @scheme[gui-utils:] described in this manual. with @scheme[gui-utils:] described in this manual.
} }
@item{ @bold{Preferences} @item{ @bold{Preferences}
@scheme[(require #, @schememodname[framework/preferences])] @scheme[(require @#,schememodname[framework/preferences])]
This library provides a subset of the names of the This library provides a subset of the names of the
@tt{framework.ss} library, namely those for @tt{framework.ss} library, namely those for

View File

@ -11,187 +11,187 @@ The global @indexed-scheme[the-color-database] object is an instance of
The following colors are in the database: The following colors are in the database:
@schemeblock[ @schemeblock[
#, @colorName[#"Orange Red" #"OrangeRed" 255 69 0] @#,colorName[#"Orange Red" #"OrangeRed" 255 69 0]
#, @colorName[#"OrangeRed" #"OrangeRed" 255 69 0] @#,colorName[#"OrangeRed" #"OrangeRed" 255 69 0]
#, @colorName[#"Tomato" #"Tomato" 255 99 71] @#,colorName[#"Tomato" #"Tomato" 255 99 71]
#, @colorName[#"DarkRed" #"DarkRed" 139 0 0] @#,colorName[#"DarkRed" #"DarkRed" 139 0 0]
#, @colorName[#"Red" #"Red" 255 0 0] @#,colorName[#"Red" #"Red" 255 0 0]
#, @colorName[#"Firebrick" #"Firebrick" 178 34 34] @#,colorName[#"Firebrick" #"Firebrick" 178 34 34]
#, @colorName[#"Crimson" #"Crimson" 220 20 60] @#,colorName[#"Crimson" #"Crimson" 220 20 60]
#, @colorName[#"DeepPink" #"DeepPink" 255 20 147] @#,colorName[#"DeepPink" #"DeepPink" 255 20 147]
#, @colorName[#"Maroon" #"Maroon" 176 48 96] @#,colorName[#"Maroon" #"Maroon" 176 48 96]
#, @colorName[#"Indian Red" #"IndianRed" 205 92 92] @#,colorName[#"Indian Red" #"IndianRed" 205 92 92]
#, @colorName[#"IndianRed" #"IndianRed" 205 92 92] @#,colorName[#"IndianRed" #"IndianRed" 205 92 92]
#, @colorName[#"Medium Violet Red" #"MediumVioletRed" 199 21 133] @#,colorName[#"Medium Violet Red" #"MediumVioletRed" 199 21 133]
#, @colorName[#"MediumVioletRed" #"MediumVioletRed" 199 21 133] @#,colorName[#"MediumVioletRed" #"MediumVioletRed" 199 21 133]
#, @colorName[#"Violet Red" #"VioletRed" 208 32 144] @#,colorName[#"Violet Red" #"VioletRed" 208 32 144]
#, @colorName[#"VioletRed" #"VioletRed" 208 32 144] @#,colorName[#"VioletRed" #"VioletRed" 208 32 144]
#, @colorName[#"LightCoral" #"LightCoral" 240 128 128] @#,colorName[#"LightCoral" #"LightCoral" 240 128 128]
#, @colorName[#"HotPink" #"HotPink" 255 105 180] @#,colorName[#"HotPink" #"HotPink" 255 105 180]
#, @colorName[#"PaleVioletRed" #"PaleVioletRed" 219 112 147] @#,colorName[#"PaleVioletRed" #"PaleVioletRed" 219 112 147]
#, @colorName[#"LightPink" #"LightPink" 255 182 193] @#,colorName[#"LightPink" #"LightPink" 255 182 193]
#, @colorName[#"RosyBrown" #"RosyBrown" 188 143 143] @#,colorName[#"RosyBrown" #"RosyBrown" 188 143 143]
#, @colorName[#"Pink" #"Pink" 255 192 203] @#,colorName[#"Pink" #"Pink" 255 192 203]
#, @colorName[#"Orchid" #"Orchid" 218 112 214] @#,colorName[#"Orchid" #"Orchid" 218 112 214]
#, @colorName[#"LavenderBlush" #"LavenderBlush" 255 240 245] @#,colorName[#"LavenderBlush" #"LavenderBlush" 255 240 245]
#, @colorName[#"Snow" #"Snow" 255 250 250] @#,colorName[#"Snow" #"Snow" 255 250 250]
#, @colorName[#"Chocolate" #"Chocolate" 210 105 30] @#,colorName[#"Chocolate" #"Chocolate" 210 105 30]
#, @colorName[#"SaddleBrown" #"SaddleBrown" 139 69 19] @#,colorName[#"SaddleBrown" #"SaddleBrown" 139 69 19]
#, @colorName[#"Brown" #"Brown" 132 60 36] @#,colorName[#"Brown" #"Brown" 132 60 36]
#, @colorName[#"DarkOrange" #"DarkOrange" 255 140 0] @#,colorName[#"DarkOrange" #"DarkOrange" 255 140 0]
#, @colorName[#"Coral" #"Coral" 255 127 80] @#,colorName[#"Coral" #"Coral" 255 127 80]
#, @colorName[#"Sienna" #"Sienna" 160 82 45] @#,colorName[#"Sienna" #"Sienna" 160 82 45]
#, @colorName[#"Orange" #"Orange" 255 165 0] @#,colorName[#"Orange" #"Orange" 255 165 0]
#, @colorName[#"Salmon" #"Salmon" 250 128 114] @#,colorName[#"Salmon" #"Salmon" 250 128 114]
#, @colorName[#"Peru" #"Peru" 205 133 63] @#,colorName[#"Peru" #"Peru" 205 133 63]
#, @colorName[#"DarkGoldenrod" #"DarkGoldenrod" 184 134 11] @#,colorName[#"DarkGoldenrod" #"DarkGoldenrod" 184 134 11]
#, @colorName[#"Goldenrod" #"Goldenrod" 218 165 32] @#,colorName[#"Goldenrod" #"Goldenrod" 218 165 32]
#, @colorName[#"SandyBrown" #"SandyBrown" 244 164 96] @#,colorName[#"SandyBrown" #"SandyBrown" 244 164 96]
#, @colorName[#"LightSalmon" #"LightSalmon" 255 160 122] @#,colorName[#"LightSalmon" #"LightSalmon" 255 160 122]
#, @colorName[#"DarkSalmon" #"DarkSalmon" 233 150 122] @#,colorName[#"DarkSalmon" #"DarkSalmon" 233 150 122]
#, @colorName[#"Gold" #"Gold" 255 215 0] @#,colorName[#"Gold" #"Gold" 255 215 0]
#, @colorName[#"Yellow" #"Yellow" 255 255 0] @#,colorName[#"Yellow" #"Yellow" 255 255 0]
#, @colorName[#"Olive" #"Olive" 128 128 0] @#,colorName[#"Olive" #"Olive" 128 128 0]
#, @colorName[#"Burlywood" #"Burlywood" 222 184 135] @#,colorName[#"Burlywood" #"Burlywood" 222 184 135]
#, @colorName[#"Tan" #"Tan" 210 180 140] @#,colorName[#"Tan" #"Tan" 210 180 140]
#, @colorName[#"NavajoWhite" #"NavajoWhite" 255 222 173] @#,colorName[#"NavajoWhite" #"NavajoWhite" 255 222 173]
#, @colorName[#"PeachPuff" #"PeachPuff" 255 218 185] @#,colorName[#"PeachPuff" #"PeachPuff" 255 218 185]
#, @colorName[#"Khaki" #"Khaki" 240 230 140] @#,colorName[#"Khaki" #"Khaki" 240 230 140]
#, @colorName[#"DarkKhaki" #"DarkKhaki" 189 183 107] @#,colorName[#"DarkKhaki" #"DarkKhaki" 189 183 107]
#, @colorName[#"Moccasin" #"Moccasin" 255 228 181] @#,colorName[#"Moccasin" #"Moccasin" 255 228 181]
#, @colorName[#"Wheat" #"Wheat" 245 222 179] @#,colorName[#"Wheat" #"Wheat" 245 222 179]
#, @colorName[#"Bisque" #"Bisque" 255 228 196] @#,colorName[#"Bisque" #"Bisque" 255 228 196]
#, @colorName[#"PaleGoldenrod" #"PaleGoldenrod" 238 232 170] @#,colorName[#"PaleGoldenrod" #"PaleGoldenrod" 238 232 170]
#, @colorName[#"BlanchedAlmond" #"BlanchedAlmond" 255 235 205] @#,colorName[#"BlanchedAlmond" #"BlanchedAlmond" 255 235 205]
#, @colorName[#"Medium Goldenrod" #"MediumGoldenrod" 234 234 173] @#,colorName[#"Medium Goldenrod" #"MediumGoldenrod" 234 234 173]
#, @colorName[#"MediumGoldenrod" #"MediumGoldenrod" 234 234 173] @#,colorName[#"MediumGoldenrod" #"MediumGoldenrod" 234 234 173]
#, @colorName[#"PapayaWhip" #"PapayaWhip" 255 239 213] @#,colorName[#"PapayaWhip" #"PapayaWhip" 255 239 213]
#, @colorName[#"MistyRose" #"MistyRose" 255 228 225] @#,colorName[#"MistyRose" #"MistyRose" 255 228 225]
#, @colorName[#"LemonChiffon" #"LemonChiffon" 255 250 205] @#,colorName[#"LemonChiffon" #"LemonChiffon" 255 250 205]
#, @colorName[#"AntiqueWhite" #"AntiqueWhite" 250 235 215] @#,colorName[#"AntiqueWhite" #"AntiqueWhite" 250 235 215]
#, @colorName[#"Cornsilk" #"Cornsilk" 255 248 220] @#,colorName[#"Cornsilk" #"Cornsilk" 255 248 220]
#, @colorName[#"LightGoldenrodYellow" #"LightGoldenrodYellow" 250 250 210] @#,colorName[#"LightGoldenrodYellow" #"LightGoldenrodYellow" 250 250 210]
#, @colorName[#"OldLace" #"OldLace" 253 245 230] @#,colorName[#"OldLace" #"OldLace" 253 245 230]
#, @colorName[#"Linen" #"Linen" 250 240 230] @#,colorName[#"Linen" #"Linen" 250 240 230]
#, @colorName[#"LightYellow" #"LightYellow" 255 255 224] @#,colorName[#"LightYellow" #"LightYellow" 255 255 224]
#, @colorName[#"SeaShell" #"SeaShell" 255 245 238] @#,colorName[#"SeaShell" #"SeaShell" 255 245 238]
#, @colorName[#"Beige" #"Beige" 245 245 220] @#,colorName[#"Beige" #"Beige" 245 245 220]
#, @colorName[#"FloralWhite" #"FloralWhite" 255 250 240] @#,colorName[#"FloralWhite" #"FloralWhite" 255 250 240]
#, @colorName[#"Ivory" #"Ivory" 255 255 240] @#,colorName[#"Ivory" #"Ivory" 255 255 240]
#, @colorName[#"Green" #"Green" 0 255 0] @#,colorName[#"Green" #"Green" 0 255 0]
#, @colorName[#"LawnGreen" #"LawnGreen" 124 252 0] @#,colorName[#"LawnGreen" #"LawnGreen" 124 252 0]
#, @colorName[#"Chartreuse" #"Chartreuse" 127 255 0] @#,colorName[#"Chartreuse" #"Chartreuse" 127 255 0]
#, @colorName[#"Green Yellow" #"GreenYellow" 173 255 47] @#,colorName[#"Green Yellow" #"GreenYellow" 173 255 47]
#, @colorName[#"GreenYellow" #"GreenYellow" 173 255 47] @#,colorName[#"GreenYellow" #"GreenYellow" 173 255 47]
#, @colorName[#"Yellow Green" #"YellowGreen" 154 205 50] @#,colorName[#"Yellow Green" #"YellowGreen" 154 205 50]
#, @colorName[#"YellowGreen" #"YellowGreen" 154 205 50] @#,colorName[#"YellowGreen" #"YellowGreen" 154 205 50]
#, @colorName[#"Medium Forest Green" #"MediumForestGreen" 107 142 35] @#,colorName[#"Medium Forest Green" #"MediumForestGreen" 107 142 35]
#, @colorName[#"OliveDrab" #"OliveDrab" 107 142 35] @#,colorName[#"OliveDrab" #"OliveDrab" 107 142 35]
#, @colorName[#"MediumForestGreen" #"MediumForestGreen" 107 142 35] @#,colorName[#"MediumForestGreen" #"MediumForestGreen" 107 142 35]
#, @colorName[#"Dark Olive Green" #"DarkOliveGreen" 85 107 47] @#,colorName[#"Dark Olive Green" #"DarkOliveGreen" 85 107 47]
#, @colorName[#"DarkOliveGreen" #"DarkOliveGreen" 85 107 47] @#,colorName[#"DarkOliveGreen" #"DarkOliveGreen" 85 107 47]
#, @colorName[#"DarkSeaGreen" #"DarkSeaGreen" 143 188 139] @#,colorName[#"DarkSeaGreen" #"DarkSeaGreen" 143 188 139]
#, @colorName[#"Lime" #"Lime" 0 255 0] @#,colorName[#"Lime" #"Lime" 0 255 0]
#, @colorName[#"Dark Green" #"DarkGreen" 0 100 0] @#,colorName[#"Dark Green" #"DarkGreen" 0 100 0]
#, @colorName[#"DarkGreen" #"DarkGreen" 0 100 0] @#,colorName[#"DarkGreen" #"DarkGreen" 0 100 0]
#, @colorName[#"Lime Green" #"LimeGreen" 50 205 50] @#,colorName[#"Lime Green" #"LimeGreen" 50 205 50]
#, @colorName[#"LimeGreen" #"LimeGreen" 50 205 50] @#,colorName[#"LimeGreen" #"LimeGreen" 50 205 50]
#, @colorName[#"Forest Green" #"ForestGreen" 34 139 34] @#,colorName[#"Forest Green" #"ForestGreen" 34 139 34]
#, @colorName[#"ForestGreen" #"ForestGreen" 34 139 34] @#,colorName[#"ForestGreen" #"ForestGreen" 34 139 34]
#, @colorName[#"Spring Green" #"SpringGreen" 0 255 127] @#,colorName[#"Spring Green" #"SpringGreen" 0 255 127]
#, @colorName[#"SpringGreen" #"SpringGreen" 0 255 127] @#,colorName[#"SpringGreen" #"SpringGreen" 0 255 127]
#, @colorName[#"Medium Spring Green" #"MediumSpringGreen" 0 250 154] @#,colorName[#"Medium Spring Green" #"MediumSpringGreen" 0 250 154]
#, @colorName[#"MediumSpringGreen" #"MediumSpringGreen" 0 250 154] @#,colorName[#"MediumSpringGreen" #"MediumSpringGreen" 0 250 154]
#, @colorName[#"Sea Green" #"SeaGreen" 46 139 87] @#,colorName[#"Sea Green" #"SeaGreen" 46 139 87]
#, @colorName[#"SeaGreen" #"SeaGreen" 46 139 87] @#,colorName[#"SeaGreen" #"SeaGreen" 46 139 87]
#, @colorName[#"Medium Sea Green" #"MediumSeaGreen" 60 179 113] @#,colorName[#"Medium Sea Green" #"MediumSeaGreen" 60 179 113]
#, @colorName[#"MediumSeaGreen" #"MediumSeaGreen" 60 179 113] @#,colorName[#"MediumSeaGreen" #"MediumSeaGreen" 60 179 113]
#, @colorName[#"Aquamarine" #"Aquamarine" 112 216 144] @#,colorName[#"Aquamarine" #"Aquamarine" 112 216 144]
#, @colorName[#"LightGreen" #"LightGreen" 144 238 144] @#,colorName[#"LightGreen" #"LightGreen" 144 238 144]
#, @colorName[#"Pale Green" #"PaleGreen" 152 251 152] @#,colorName[#"Pale Green" #"PaleGreen" 152 251 152]
#, @colorName[#"PaleGreen" #"PaleGreen" 152 251 152] @#,colorName[#"PaleGreen" #"PaleGreen" 152 251 152]
#, @colorName[#"Medium Aquamarine" #"MediumAquamarine" 102 205 170] @#,colorName[#"Medium Aquamarine" #"MediumAquamarine" 102 205 170]
#, @colorName[#"MediumAquamarine" #"MediumAquamarine" 102 205 170] @#,colorName[#"MediumAquamarine" #"MediumAquamarine" 102 205 170]
#, @colorName[#"Turquoise" #"Turquoise" 64 224 208] @#,colorName[#"Turquoise" #"Turquoise" 64 224 208]
#, @colorName[#"LightSeaGreen" #"LightSeaGreen" 32 178 170] @#,colorName[#"LightSeaGreen" #"LightSeaGreen" 32 178 170]
#, @colorName[#"Medium Turquoise" #"MediumTurquoise" 72 209 204] @#,colorName[#"Medium Turquoise" #"MediumTurquoise" 72 209 204]
#, @colorName[#"MediumTurquoise" #"MediumTurquoise" 72 209 204] @#,colorName[#"MediumTurquoise" #"MediumTurquoise" 72 209 204]
#, @colorName[#"Honeydew" #"Honeydew" 240 255 240] @#,colorName[#"Honeydew" #"Honeydew" 240 255 240]
#, @colorName[#"MintCream" #"MintCream" 245 255 250] @#,colorName[#"MintCream" #"MintCream" 245 255 250]
#, @colorName[#"RoyalBlue" #"RoyalBlue" 65 105 225] @#,colorName[#"RoyalBlue" #"RoyalBlue" 65 105 225]
#, @colorName[#"DodgerBlue" #"DodgerBlue" 30 144 255] @#,colorName[#"DodgerBlue" #"DodgerBlue" 30 144 255]
#, @colorName[#"DeepSkyBlue" #"DeepSkyBlue" 0 191 255] @#,colorName[#"DeepSkyBlue" #"DeepSkyBlue" 0 191 255]
#, @colorName[#"CornflowerBlue" #"CornflowerBlue" 100 149 237] @#,colorName[#"CornflowerBlue" #"CornflowerBlue" 100 149 237]
#, @colorName[#"Steel Blue" #"SteelBlue" 70 130 180] @#,colorName[#"Steel Blue" #"SteelBlue" 70 130 180]
#, @colorName[#"SteelBlue" #"SteelBlue" 70 130 180] @#,colorName[#"SteelBlue" #"SteelBlue" 70 130 180]
#, @colorName[#"LightSkyBlue" #"LightSkyBlue" 135 206 250] @#,colorName[#"LightSkyBlue" #"LightSkyBlue" 135 206 250]
#, @colorName[#"Dark Turquoise" #"DarkTurquoise" 0 206 209] @#,colorName[#"Dark Turquoise" #"DarkTurquoise" 0 206 209]
#, @colorName[#"DarkTurquoise" #"DarkTurquoise" 0 206 209] @#,colorName[#"DarkTurquoise" #"DarkTurquoise" 0 206 209]
#, @colorName[#"Cyan" #"Cyan" 0 255 255] @#,colorName[#"Cyan" #"Cyan" 0 255 255]
#, @colorName[#"Aqua" #"Aqua" 0 255 255] @#,colorName[#"Aqua" #"Aqua" 0 255 255]
#, @colorName[#"DarkCyan" #"DarkCyan" 0 139 139] @#,colorName[#"DarkCyan" #"DarkCyan" 0 139 139]
#, @colorName[#"Teal" #"Teal" 0 128 128] @#,colorName[#"Teal" #"Teal" 0 128 128]
#, @colorName[#"Sky Blue" #"SkyBlue" 135 206 235] @#,colorName[#"Sky Blue" #"SkyBlue" 135 206 235]
#, @colorName[#"SkyBlue" #"SkyBlue" 135 206 235] @#,colorName[#"SkyBlue" #"SkyBlue" 135 206 235]
#, @colorName[#"Cadet Blue" #"CadetBlue" 96 160 160] @#,colorName[#"Cadet Blue" #"CadetBlue" 96 160 160]
#, @colorName[#"CadetBlue" #"CadetBlue" 95 158 160] @#,colorName[#"CadetBlue" #"CadetBlue" 95 158 160]
#, @colorName[#"Dark Slate Gray" #"DarkSlateGray" 47 79 79] @#,colorName[#"Dark Slate Gray" #"DarkSlateGray" 47 79 79]
#, @colorName[#"DarkSlateGray" #"DarkSlateGray" 47 79 79] @#,colorName[#"DarkSlateGray" #"DarkSlateGray" 47 79 79]
#, @colorName[#"LightSlateGray" #"LightSlateGray" 119 136 153] @#,colorName[#"LightSlateGray" #"LightSlateGray" 119 136 153]
#, @colorName[#"SlateGray" #"SlateGray" 112 128 144] @#,colorName[#"SlateGray" #"SlateGray" 112 128 144]
#, @colorName[#"Light Steel Blue" #"LightSteelBlue" 176 196 222] @#,colorName[#"Light Steel Blue" #"LightSteelBlue" 176 196 222]
#, @colorName[#"LightSteelBlue" #"LightSteelBlue" 176 196 222] @#,colorName[#"LightSteelBlue" #"LightSteelBlue" 176 196 222]
#, @colorName[#"Light Blue" #"LightBlue" 173 216 230] @#,colorName[#"Light Blue" #"LightBlue" 173 216 230]
#, @colorName[#"LightBlue" #"LightBlue" 173 216 230] @#,colorName[#"LightBlue" #"LightBlue" 173 216 230]
#, @colorName[#"PowderBlue" #"PowderBlue" 176 224 230] @#,colorName[#"PowderBlue" #"PowderBlue" 176 224 230]
#, @colorName[#"PaleTurquoise" #"PaleTurquoise" 175 238 238] @#,colorName[#"PaleTurquoise" #"PaleTurquoise" 175 238 238]
#, @colorName[#"LightCyan" #"LightCyan" 224 255 255] @#,colorName[#"LightCyan" #"LightCyan" 224 255 255]
#, @colorName[#"AliceBlue" #"AliceBlue" 240 248 255] @#,colorName[#"AliceBlue" #"AliceBlue" 240 248 255]
#, @colorName[#"Azure" #"Azure" 240 255 255] @#,colorName[#"Azure" #"Azure" 240 255 255]
#, @colorName[#"Medium Blue" #"MediumBlue" 0 0 205] @#,colorName[#"Medium Blue" #"MediumBlue" 0 0 205]
#, @colorName[#"MediumBlue" #"MediumBlue" 0 0 205] @#,colorName[#"MediumBlue" #"MediumBlue" 0 0 205]
#, @colorName[#"DarkBlue" #"DarkBlue" 0 0 139] @#,colorName[#"DarkBlue" #"DarkBlue" 0 0 139]
#, @colorName[#"Midnight Blue" #"MidnightBlue" 25 25 112] @#,colorName[#"Midnight Blue" #"MidnightBlue" 25 25 112]
#, @colorName[#"MidnightBlue" #"MidnightBlue" 25 25 112] @#,colorName[#"MidnightBlue" #"MidnightBlue" 25 25 112]
#, @colorName[#"Navy" #"Navy" 36 36 140] @#,colorName[#"Navy" #"Navy" 36 36 140]
#, @colorName[#"Blue" #"Blue" 0 0 255] @#,colorName[#"Blue" #"Blue" 0 0 255]
#, @colorName[#"Indigo" #"Indigo" 75 0 130] @#,colorName[#"Indigo" #"Indigo" 75 0 130]
#, @colorName[#"Blue Violet" #"BlueViolet" 138 43 226] @#,colorName[#"Blue Violet" #"BlueViolet" 138 43 226]
#, @colorName[#"BlueViolet" #"BlueViolet" 138 43 226] @#,colorName[#"BlueViolet" #"BlueViolet" 138 43 226]
#, @colorName[#"Medium Slate Blue" #"MediumSlateBlue" 123 104 238] @#,colorName[#"Medium Slate Blue" #"MediumSlateBlue" 123 104 238]
#, @colorName[#"MediumSlateBlue" #"MediumSlateBlue" 123 104 238] @#,colorName[#"MediumSlateBlue" #"MediumSlateBlue" 123 104 238]
#, @colorName[#"Slate Blue" #"SlateBlue" 106 90 205] @#,colorName[#"Slate Blue" #"SlateBlue" 106 90 205]
#, @colorName[#"SlateBlue" #"SlateBlue" 106 90 205] @#,colorName[#"SlateBlue" #"SlateBlue" 106 90 205]
#, @colorName[#"Purple" #"Purple" 160 32 240] @#,colorName[#"Purple" #"Purple" 160 32 240]
#, @colorName[#"Dark Slate Blue" #"DarkSlateBlue" 72 61 139] @#,colorName[#"Dark Slate Blue" #"DarkSlateBlue" 72 61 139]
#, @colorName[#"DarkSlateBlue" #"DarkSlateBlue" 72 61 139] @#,colorName[#"DarkSlateBlue" #"DarkSlateBlue" 72 61 139]
#, @colorName[#"DarkViolet" #"DarkViolet" 148 0 211] @#,colorName[#"DarkViolet" #"DarkViolet" 148 0 211]
#, @colorName[#"Dark Orchid" #"DarkOrchid" 153 50 204] @#,colorName[#"Dark Orchid" #"DarkOrchid" 153 50 204]
#, @colorName[#"DarkOrchid" #"DarkOrchid" 153 50 204] @#,colorName[#"DarkOrchid" #"DarkOrchid" 153 50 204]
#, @colorName[#"MediumPurple" #"MediumPurple" 147 112 219] @#,colorName[#"MediumPurple" #"MediumPurple" 147 112 219]
#, @colorName[#"Cornflower Blue" #"CornflowerBlue" 68 64 108] @#,colorName[#"Cornflower Blue" #"CornflowerBlue" 68 64 108]
#, @colorName[#"Medium Orchid" #"MediumOrchid" 186 85 211] @#,colorName[#"Medium Orchid" #"MediumOrchid" 186 85 211]
#, @colorName[#"MediumOrchid" #"MediumOrchid" 186 85 211] @#,colorName[#"MediumOrchid" #"MediumOrchid" 186 85 211]
#, @colorName[#"Magenta" #"Magenta" 255 0 255] @#,colorName[#"Magenta" #"Magenta" 255 0 255]
#, @colorName[#"Fuchsia" #"Fuchsia" 255 0 255] @#,colorName[#"Fuchsia" #"Fuchsia" 255 0 255]
#, @colorName[#"DarkMagenta" #"DarkMagenta" 139 0 139] @#,colorName[#"DarkMagenta" #"DarkMagenta" 139 0 139]
#, @colorName[#"Violet" #"Violet" 238 130 238] @#,colorName[#"Violet" #"Violet" 238 130 238]
#, @colorName[#"Plum" #"Plum" 221 160 221] @#,colorName[#"Plum" #"Plum" 221 160 221]
#, @colorName[#"Lavender" #"Lavender" 230 230 250] @#,colorName[#"Lavender" #"Lavender" 230 230 250]
#, @colorName[#"Thistle" #"Thistle" 216 191 216] @#,colorName[#"Thistle" #"Thistle" 216 191 216]
#, @colorName[#"GhostWhite" #"GhostWhite" 248 248 255] @#,colorName[#"GhostWhite" #"GhostWhite" 248 248 255]
#, @colorName[#"White" #"White" 255 255 255] @#,colorName[#"White" #"White" 255 255 255]
#, @colorName[#"WhiteSmoke" #"WhiteSmoke" 245 245 245] @#,colorName[#"WhiteSmoke" #"WhiteSmoke" 245 245 245]
#, @colorName[#"Gainsboro" #"Gainsboro" 220 220 220] @#,colorName[#"Gainsboro" #"Gainsboro" 220 220 220]
#, @colorName[#"Light Gray" #"LightGray" 211 211 211] @#,colorName[#"Light Gray" #"LightGray" 211 211 211]
#, @colorName[#"LightGray" #"LightGray" 211 211 211] @#,colorName[#"LightGray" #"LightGray" 211 211 211]
#, @colorName[#"Silver" #"Silver" 192 192 192] @#,colorName[#"Silver" #"Silver" 192 192 192]
#, @colorName[#"Gray" #"Gray" 190 190 190] @#,colorName[#"Gray" #"Gray" 190 190 190]
#, @colorName[#"Dark Gray" #"DarkGray" 169 169 169] @#,colorName[#"Dark Gray" #"DarkGray" 169 169 169]
#, @colorName[#"DarkGray" #"DarkGray" 169 169 169] @#,colorName[#"DarkGray" #"DarkGray" 169 169 169]
#, @colorName[#"Dim Gray" #"DimGray" 105 105 105] @#,colorName[#"Dim Gray" #"DimGray" 105 105 105]
#, @colorName[#"DimGray" #"DimGray" 105 105 105] @#,colorName[#"DimGray" #"DimGray" 105 105 105]
#, @colorName[#"Black" #"Black" 0 0 0] @#,colorName[#"Black" #"Black" 0 0 0]
] ]
The names are not case-sensitive. The names are not case-sensitive.

View File

@ -35,23 +35,23 @@ The following example creates a frame with a drawing canvas, and then
mouth: mouth:
@schemeblock[ @schemeblock[
(code:comment #, @t{Make a 300 x 300 frame}) (code:comment @#,t{Make a 300 x 300 frame})
(define frame (new frame% [label "Drawing Example"] (define frame (new frame% [label "Drawing Example"]
[width 300] [width 300]
[height 300])) [height 300]))
(code:comment #, @t{Make the drawing area}) (code:comment @#,t{Make the drawing area})
(define canvas (new canvas% [parent frame])) (define canvas (new canvas% [parent frame]))
(code:comment #, @t{Get the canvas's drawing context}) (code:comment @#,t{Get the canvas's drawing context})
(define dc (send canvas #,(:: canvas<%> get-dc))) (define dc (send canvas #,(:: canvas<%> get-dc)))
(code:comment #, @t{Make some pens and brushes}) (code:comment @#,t{Make some pens and brushes})
(define no-pen (make-object pen% "BLACK" 1 'transparent)) (define no-pen (make-object pen% "BLACK" 1 'transparent))
(define no-brush (make-object brush% "BLACK" 'transparent)) (define no-brush (make-object brush% "BLACK" 'transparent))
(define blue-brush (make-object brush% "BLUE" 'solid)) (define blue-brush (make-object brush% "BLUE" 'solid))
(define yellow-brush (make-object brush% "YELLOW" 'solid)) (define yellow-brush (make-object brush% "YELLOW" 'solid))
(define red-pen (make-object pen% "RED" 2 'solid)) (define red-pen (make-object pen% "RED" 2 'solid))
(code:comment #, @t{Define a procedure to draw a face}) (code:comment @#,t{Define a procedure to draw a face})
(define (draw-face dc) (define (draw-face dc)
(send dc #,(:: dc<%> set-pen) no-pen) (send dc #,(:: dc<%> set-pen) no-pen)
(send dc #,(:: dc<%> set-brush) blue-brush) (send dc #,(:: dc<%> set-brush) blue-brush)
@ -66,11 +66,11 @@ The following example creates a frame with a drawing canvas, and then
(let ([-pi (atan 0 -1)]) (let ([-pi (atan 0 -1)])
(send dc #,(:: dc<%> draw-arc) 75 75 150 150 (* 5/4 -pi) (* 7/4 -pi)))) (send dc #,(:: dc<%> draw-arc) 75 75 150 150 (* 5/4 -pi) (* 7/4 -pi))))
(code:comment #, @t{Show the frame}) (code:comment @#,t{Show the frame})
(send frame #,(:: top-level-window<%> show) #t) (send frame #,(:: top-level-window<%> show) #t)
(code:comment #, @t{Wait a second to let the window get ready}) (code:comment @#,t{Wait a second to let the window get ready})
(sleep/yield 1) (sleep/yield 1)
(code:comment #, @t{Draw the face}) (code:comment @#,t{Draw the face})
(draw-face dc) (draw-face dc)
] ]
@ -92,20 +92,20 @@ One second is plenty of time for the frame to show itself, but a
the canvas: the canvas:
@schemeblock[ @schemeblock[
(code:comment #, @t{Make a 300 x 300 frame}) (code:comment @#,t{Make a 300 x 300 frame})
(define frame (new frame% [label "Drawing Example"] (define frame (new frame% [label "Drawing Example"]
[width 300] [width 300]
[height 300])) [height 300]))
(code:comment #, @t{Make the drawing area with a paint callback}) (code:comment @#,t{Make the drawing area with a paint callback})
(define canvas (define canvas
(new canvas% [parent frame] (new canvas% [parent frame]
[paint-callback [paint-callback
(lambda (canvas dc) (draw-face dc))])) (lambda (canvas dc) (draw-face dc))]))
(code:comment #, @t{... pens, brushes, and @scheme[draw-face] are the same as above ...}) (code:comment @#,t{... pens, brushes, and @scheme[draw-face] are the same as above ...})
(code:comment #, @t{Show the frame}) (code:comment @#,t{Show the frame})
(send frame #,(:: top-level-window<%> show) #t) (send frame #,(:: top-level-window<%> show) #t)
] ]
@ -118,31 +118,31 @@ Suppose that @scheme[draw-face] creates a particularly complex face that
bitmap: bitmap:
@schemeblock[ @schemeblock[
(code:comment #, @t{... pens, brushes, and @scheme[draw-face] are the same as above ...}) (code:comment @#,t{... pens, brushes, and @scheme[draw-face] are the same as above ...})
(code:comment #, @t{Create a 300 x 300 bitmap}) (code:comment @#,t{Create a 300 x 300 bitmap})
(define face-bitmap (make-object bitmap% 300 300)) (define face-bitmap (make-object bitmap% 300 300))
(code:comment #, @t{Create a drawing context for the bitmap}) (code:comment @#,t{Create a drawing context for the bitmap})
(define bm-dc (make-object bitmap-dc% face-bitmap)) (define bm-dc (make-object bitmap-dc% face-bitmap))
(code:comment #, @t{A bitmap's initial content is undefined; clear it before drawing}) (code:comment @#,t{A bitmap's initial content is undefined; clear it before drawing})
(send bm-dc #,(:: dc<%> clear)) (send bm-dc #,(:: dc<%> clear))
(code:comment #, @t{Draw the face into the bitmap}) (code:comment @#,t{Draw the face into the bitmap})
(draw-face bm-dc) (draw-face bm-dc)
(code:comment #, @t{Make a 300 x 300 frame}) (code:comment @#,t{Make a 300 x 300 frame})
(define frame (new frame% [label "Drawing Example"] (define frame (new frame% [label "Drawing Example"]
[width 300] [width 300]
[height 300])) [height 300]))
(code:comment #, @t{Make a drawing area whose paint callback copies the bitmap}) (code:comment @#,t{Make a drawing area whose paint callback copies the bitmap})
(define canvas (define canvas
(new canvas% [parent frame] (new canvas% [parent frame]
[paint-callback [paint-callback
(lambda (canvas dc) (lambda (canvas dc)
(send dc #,(:: dc<%> draw-bitmap) face-bitmap 0 0))])) (send dc #,(:: dc<%> draw-bitmap) face-bitmap 0 0))]))
(code:comment #, @t{Show the frame}) (code:comment @#,t{Show the frame})
(send frame #,(:: top-level-window<%> show) #t) (send frame #,(:: top-level-window<%> show) #t)
] ]

View File

@ -120,7 +120,7 @@ We can insert the old text editor (which we recently removed from the
creating an editor snip: creating an editor snip:
@schemeblock[ @schemeblock[
(define s (make-object editor-snip% t)) (code:comment #, @t{@scheme[t] is the old text editor}) (define s (make-object editor-snip% t)) (code:comment @#,t{@scheme[t] is the old text editor})
(send pb #,(:: editor<%> insert) s) (send pb #,(:: editor<%> insert) s)
] ]
@ -128,7 +128,7 @@ An individual snip cannot be inserted into different editors at the
same time, or inserted multiple times in the same editor: same time, or inserted multiple times in the same editor:
@schemeblock[ @schemeblock[
(send pb #,(:: editor<%> insert) s) (code:comment #, @t{no effect}) (send pb #,(:: editor<%> insert) s) (code:comment @#,t{no effect})
] ]
However, we can make a deep copy of the snip and insert the copy into However, we can make a deep copy of the snip and insert the copy into

View File

@ -250,9 +250,9 @@ If the event does not correspond to a complete shortcut combination,
Returns the result of Returns the result of
@schemeblock[ @schemeblock[
(or (send this #, @method[frame% on-menu-char] event) (or (send this @#,method[frame% on-menu-char] event)
(send this #, @method[top-level-window<%> on-system-menu-char] event) (send this @#,method[top-level-window<%> on-system-menu-char] event)
(send this #, @method[top-level-window<%> on-traverse-char] event)) (send this @#,method[top-level-window<%> on-traverse-char] event))
] ]
} }

View File

@ -103,13 +103,13 @@ For a text field, the most useful methods of a @scheme[text%] object
are the following: are the following:
@itemize[ @itemize[
@item{@scheme[(send a-text #, @method[text% get-text])] returns @item{@scheme[(send a-text @#,method[text% get-text])] returns
the current text of the editor.} the current text of the editor.}
@item{@scheme[(send a-text #, @method[text% erase])] deletes all text from @item{@scheme[(send a-text @#,method[text% erase])] deletes all text from
the editor.} the editor.}
@item{@scheme[(send a-text #, @method[text% insert] _str)] inserts @item{@scheme[(send a-text @#,method[text% insert] _str)] inserts
@scheme[_str] into the editor at the current caret position.} @scheme[_str] into the editor at the current caret position.}
] ]

View File

@ -12,10 +12,10 @@ The PLT Scheme windowing toolbox provides the basic building blocks of GUI
@scheme[frame%] class: @scheme[frame%] class:
@schemeblock[ @schemeblock[
(code:comment #, @t{Make a frame by instantiating the @scheme[frame%] class}) (code:comment @#,t{Make a frame by instantiating the @scheme[frame%] class})
(define frame (new frame% [label "Example"])) (define frame (new frame% [label "Example"]))
(code:comment #, @t{Show the frame by calling its @method[top-level-window<%> show] method}) (code:comment @#,t{Show the frame by calling its @method[top-level-window<%> show] method})
(send frame #,(:: top-level-window<%> show) #t) (send frame #,(:: top-level-window<%> show) #t)
] ]
@ -27,21 +27,21 @@ The built-in classes provide various mechanisms for handling GUI
clicks the button, the message changes: clicks the button, the message changes:
@schemeblock[ @schemeblock[
(code:comment #, @t{Make a frame by instantiating the @scheme[frame%] class}) (code:comment @#,t{Make a frame by instantiating the @scheme[frame%] class})
(define frame (new frame% [label "Example"])) (define frame (new frame% [label "Example"]))
(code:comment #, @t{Make a static text message in the frame}) (code:comment @#,t{Make a static text message in the frame})
(define msg (new message% [parent frame] (define msg (new message% [parent frame]
[label "No events so far..."])) [label "No events so far..."]))
(code:comment #, @t{Make a button in the frame}) (code:comment @#,t{Make a button in the frame})
(new button% [parent frame] (new button% [parent frame]
[label "Click Me"] [label "Click Me"]
(code:comment #, @t{Callback procedure for a button click:}) (code:comment @#,t{Callback procedure for a button click:})
(callback (lambda (button event) (callback (lambda (button event)
(send msg #,(method message% set-label) "Button click")))) (send msg #,(method message% set-label) "Button click"))))
(code:comment #, @t{Show the frame by calling its @scheme[show] method}) (code:comment @#,t{Show the frame by calling its @scheme[show] method})
(send frame #,(:: top-level-window<%> show) #t) (send frame #,(:: top-level-window<%> show) #t)
] ]
@ -63,19 +63,19 @@ If a window receives multiple kinds of events, the events are
that handles mouse and keyboard events: that handles mouse and keyboard events:
@schemeblock[ @schemeblock[
(code:comment #, @t{Derive a new canvas (a drawing window) class to handle events}) (code:comment @#,t{Derive a new canvas (a drawing window) class to handle events})
(define my-canvas% (define my-canvas%
(class canvas% (code:comment #, @t{The base class is @scheme[canvas%]}) (class canvas% (code:comment @#,t{The base class is @scheme[canvas%]})
(code:comment #, @t{Define overriding method to handle mouse events}) (code:comment @#,t{Define overriding method to handle mouse events})
(define/override (#,(:: canvas<%> on-event) event) (define/override (#,(:: canvas<%> on-event) event)
(send msg #,(:: message% set-label) "Canvas mouse")) (send msg #,(:: message% set-label) "Canvas mouse"))
(code:comment #, @t{Define overriding method to handle keyboard events}) (code:comment @#,t{Define overriding method to handle keyboard events})
(define/override (#,(:: canvas<%> on-char) event) (define/override (#,(:: canvas<%> on-char) event)
(send msg #,(:: message% set-label) "Canvas keyboard")) (send msg #,(:: message% set-label) "Canvas keyboard"))
(code:comment #, @t{Call the superclass init, passing on all init args}) (code:comment @#,t{Call the superclass init, passing on all init args})
(super-new))) (super-new)))
(code:comment #, @t{Make a canvas that handles events in the frame}) (code:comment @#,t{Make a canvas that handles events in the frame})
(new my-canvas% [parent frame]) (new my-canvas% [parent frame])
] ]
@ -344,23 +344,23 @@ The built-in container classes include horizontal panels (and panes),
with the following program: with the following program:
@schemeblock[ @schemeblock[
(code:comment #, @t{Create a dialog}) (code:comment @#,t{Create a dialog})
(define dialog (instantiate dialog% ("Example"))) (define dialog (instantiate dialog% ("Example")))
(code:comment #, @t{Add a text field to the dialog}) (code:comment @#,t{Add a text field to the dialog})
(new text-field% [parent dialog] [label "Your name"]) (new text-field% [parent dialog] [label "Your name"])
(code:comment #, @t{Add a horizontal panel to the dialog, with centering for buttons}) (code:comment @#,t{Add a horizontal panel to the dialog, with centering for buttons})
(define panel (new horizontal-panel% [parent dialog] (define panel (new horizontal-panel% [parent dialog]
[alignment '(center center)])) [alignment '(center center)]))
(code:comment #, @t{Add @onscreen{Cancel} and @onscreen{Ok} buttons to the horizontal panel}) (code:comment @#,t{Add @onscreen{Cancel} and @onscreen{Ok} buttons to the horizontal panel})
(new button% [parent panel] [label "Cancel"]) (new button% [parent panel] [label "Cancel"])
(new button% [parent panel] [label "Ok"]) (new button% [parent panel] [label "Ok"])
(when (system-position-ok-before-cancel?) (when (system-position-ok-before-cancel?)
(send panel #,(:: area-container<%> change-children) reverse)) (send panel #,(:: area-container<%> change-children) reverse))
(code:comment #, @t{Show the dialog}) (code:comment @#,t{Show the dialog})
(send dialog #,(:: dialog% show) #t) (send dialog #,(:: dialog% show) #t)
] ]
@ -883,7 +883,7 @@ Whenever the system dispatches an event, the call to the handler
@def+int[ @def+int[
(define (block f) (define (block f)
(code:comment #, @t{calls @scheme[f] and returns void if @scheme[f] tries to escape}) (code:comment @#,t{calls @scheme[f] and returns void if @scheme[f] tries to escape})
(let ([done? #f]) (let ([done? #f])
(let/ec k (let/ec k
(dynamic-wind (dynamic-wind

View File

@ -89,13 +89,13 @@ result, a function that takes a list of arguments cannot directly
apply a function like @scheme[+] to all of the items in the list: apply a function like @scheme[+] to all of the items in the list:
@def+int[ @def+int[
(define (avg lst) (code:comment #, @elem{doesn't work...}) (define (avg lst) (code:comment @#,elem{doesn't work...})
(/ (+ lst) (length lst))) (/ (+ lst) (length lst)))
(avg '(1 2 3)) (avg '(1 2 3))
] ]
@def+int[ @def+int[
(define (avg lst) (code:comment #, @elem{doesn't always work...}) (define (avg lst) (code:comment @#,elem{doesn't always work...})
(/ (+ (list-ref lst 0) (list-ref lst 1) (list-ref lst 2)) (/ (+ (list-ref lst 0) (list-ref lst 1) (list-ref lst 2))
(length lst))) (length lst)))
(avg '(1 2 3)) (avg '(1 2 3))

View File

@ -75,7 +75,7 @@ shadowed.
@examples[ @examples[
define define
(eval:alts (let ([#, @schemeidfont{define} 5]) #, @schemeidfont{define}) (let ([define 5]) define)) (eval:alts (let ([@#,schemeidfont{define} 5]) @#,schemeidfont{define}) (let ([define 5]) define))
] ]
Shadowing standard bindings in this way is rarely a good idea, but the Shadowing standard bindings in this way is rarely a good idea, but the

View File

@ -47,9 +47,9 @@ UTF-8-decoded form of the output.
@examples[ @examples[
(display #"Apple") (display #"Apple")
(eval:alts (code:line (display #, @schemevalfont{"\316\273"}) (code:comment #, @t{same as @scheme["\316\273"]})) (eval:alts (code:line (display @#,schemevalfont{"\316\273"}) (code:comment @#,t{same as @scheme["\316\273"]}))
(display "\316\273")) (display "\316\273"))
(code:line (display #"\316\273") (code:comment #, @t{UTF-8 encoding of @elem["\u03BB"]})) (code:line (display #"\316\273") (code:comment @#,t{UTF-8 encoding of @elem["\u03BB"]}))
] ]
For explicitly converting between strings and byte strings, Scheme For explicitly converting between strings and byte strings, Scheme
@ -62,9 +62,9 @@ arbitrary string encodings.
(bytes->string/utf-8 #"\316\273") (bytes->string/utf-8 #"\316\273")
(bytes->string/latin-1 #"\316\273") (bytes->string/latin-1 #"\316\273")
(code:line (code:line
(parameterize ([current-locale "C"]) (code:comment #, @elem{C locale supports ASCII,}) (parameterize ([current-locale "C"]) (code:comment @#,elem{C locale supports ASCII,})
(bytes->string/locale #"\316\273")) (code:comment #, @elem{only, so...})) (bytes->string/locale #"\316\273")) (code:comment @#,elem{only, so...}))
(let ([cvt (bytes-open-converter "cp1253" (code:comment #, @elem{Greek code page}) (let ([cvt (bytes-open-converter "cp1253" (code:comment @#,elem{Greek code page})
"UTF-8")] "UTF-8")]
[dest (make-bytes 2)]) [dest (make-bytes 2)])
(bytes-convert cvt #"\353" 0 1 dest) (bytes-convert cvt #"\353" 0 1 dest)

View File

@ -18,7 +18,7 @@ expands to a use of @scheme[unchecked-go]:
(module m mzscheme (module m mzscheme
(provide go) (provide go)
(define (unchecked-go n x) (define (unchecked-go n x)
(code:comment #, @t{to avoid disaster, @scheme[n] must be a number}) (code:comment @#,t{to avoid disaster, @scheme[n] must be a number})
(+ n 17)) (+ n 17))
(define-syntax (go stx) (define-syntax (go stx)
(syntax-case stx () (syntax-case stx ()

View File

@ -23,11 +23,11 @@ to the string-constant syntax used to print a string result.
@examples[ @examples[
"Apple" "Apple"
(eval:alts #, @schemevalfont{"\u03BB"} "\u03BB") (eval:alts @#,schemevalfont{"\u03BB"} "\u03BB")
(display "Apple") (display "Apple")
(display "a \"quoted\" thing") (display "a \"quoted\" thing")
(display "two\nlines") (display "two\nlines")
(eval:alts (display #, @schemevalfont{"\u03BB"}) (display "\u03BB")) (eval:alts (display @#,schemevalfont{"\u03BB"}) (display "\u03BB"))
] ]
A string can be mutable or immutable; strings written directly as A string can be mutable or immutable; strings written directly as

View File

@ -32,7 +32,7 @@ and linefeed characters print as @scheme[#\space] and
(integer->char 65) (integer->char 65)
(char->integer #\A) (char->integer #\A)
#\u03BB #\u03BB
(eval:alts #, @schemevalfont["#\\u03BB"] #\u03BB) (eval:alts @#,schemevalfont["#\\u03BB"] #\u03BB)
(integer->char 17) (integer->char 17)
(char->integer #\space) (char->integer #\space)
] ]

View File

@ -79,7 +79,7 @@ non-@scheme[#f] value from its @scheme[expr]s. As a special case,
(define (got-milk? lst) (define (got-milk? lst)
(and (not (null? lst)) (and (not (null? lst))
(or (eq? 'milk (car lst)) (or (eq? 'milk (car lst))
(got-milk? (cdr lst))))) (code:comment #, @t{recurs only if needed})) (got-milk? (cdr lst))))) (code:comment @#,t{recurs only if needed}))
(got-milk? '(apple banana)) (got-milk? '(apple banana))
(got-milk? '(apple milk banana)) (got-milk? '(apple milk banana))
] ]

View File

@ -74,8 +74,8 @@ Take a look at this excerpt from a string-processing module, inspired by the
scheme scheme
(provide/contract (provide/contract
(code:comment #, @t{pad the given str left and right with}) (code:comment @#,t{pad the given str left and right with})
(code:comment #, @t{the (optional) char so that it is centered}) (code:comment @#,t{the (optional) char so that it is centered})
[string-pad-center (->* (string? natural-number/c) [string-pad-center (->* (string? natural-number/c)
(char?) (char?)
string?)]) string?)])

View File

@ -114,7 +114,7 @@ predicate:
(car 17)) (car 17))
(eval:alts ; `examples' doesn't catch break exceptions! (eval:alts ; `examples' doesn't catch break exceptions!
(with-handlers ([exn:fail? (lambda (v) 'oops)]) (with-handlers ([exn:fail? (lambda (v) 'oops)])
(break-thread (current-thread)) (code:comment #, @t{simulate Ctl-C}) (break-thread (current-thread)) (code:comment @#,t{simulate Ctl-C})
(car 17)) (car 17))
(error "user break")) (error "user break"))
] ]
@ -203,7 +203,7 @@ changing @scheme[0] to grab the continuation before returning 0:
(define saved-k #f) (define saved-k #f)
(define (save-it!) (define (save-it!)
(call-with-composable-continuation (call-with-composable-continuation
(lambda (k) (code:comment #, @t{@scheme[k] is the captured continuation}) (lambda (k) (code:comment @#,t{@scheme[k] is the captured continuation})
(set! saved-k k) (set! saved-k k)
0))) 0)))
(+ 1 (+ 1 (+ 1 (save-it!)))) (+ 1 (+ 1 (+ 1 (save-it!))))

View File

@ -218,15 +218,15 @@ keyword, @scheme[prop:equal+hash], and then a list of three functions:
#:property #:property
prop:equal+hash prop:equal+hash
(list (lambda (a b equal?-recur) (list (lambda (a b equal?-recur)
(code:comment #, @t{compare @scheme[a] and @scheme[b]}) (code:comment @#,t{compare @scheme[a] and @scheme[b]})
(and (equal?-recur (lead-width a) (lead-width b)) (and (equal?-recur (lead-width a) (lead-width b))
(equal?-recur (lead-height a) (lead-height b)))) (equal?-recur (lead-height a) (lead-height b))))
(lambda (a hash-recur) (lambda (a hash-recur)
(code:comment #, @t{compute primary hash code of @scheme[a]}) (code:comment @#,t{compute primary hash code of @scheme[a]})
(+ (hash-recur (lead-width a)) (+ (hash-recur (lead-width a))
(* 3 (hash-recur (lead-height a))))) (* 3 (hash-recur (lead-height a)))))
(lambda (a hash2-recur) (lambda (a hash2-recur)
(code:comment #, @t{compute secondary hash code of @scheme[a]}) (code:comment @#,t{compute secondary hash code of @scheme[a]})
(+ (hash2-recur (lead-width a)) (+ (hash2-recur (lead-width a))
(hash2-recur (lead-height a)))))) (hash2-recur (lead-height a))))))
(equal? (make-lead 1 2) (make-lead 1 2)) (equal? (make-lead 1 2) (make-lead 1 2))
@ -343,7 +343,7 @@ than the one with a single field:
@interaction[ @interaction[
#:eval posn-eval #:eval posn-eval
(sprout? #s(sprout bean #f 17)) (sprout? #s(sprout bean #f 17))
(code:line (define-struct sprout (kind yummy? count) #:prefab) (code:comment #, @t{redefine})) (code:line (define-struct sprout (kind yummy? count) #:prefab) (code:comment @#,t{redefine}))
(sprout? #s(sprout bean #f 17)) (sprout? #s(sprout bean #f 17))
(sprout? lunch) (sprout? lunch)
] ]

View File

@ -128,7 +128,7 @@ The full syntax of the function shorthand for @scheme[define] is as follows:
([head id ([head id
(head args)] (head args)]
[args (code:line arg ...) [args (code:line arg ...)
(code:line arg ... #, @schemeparenfont{.} rest-id)])]{} (code:line arg ... @#,schemeparenfont{.} rest-id)])]{}
The expansion of this shorthand has one nested @scheme[lambda] form The expansion of this shorthand has one nested @scheme[lambda] form
for each @scheme[_head] in the definition, where the innermost for each @scheme[_head] in the definition, where the innermost
@ -212,18 +212,18 @@ For example, the syntax of @scheme[lambda] is
so the following are valid instances of the grammar: so the following are valid instances of the grammar:
@schemeblock[ @schemeblock[
(lambda (f) (code:comment #, @elem{no definitions}) (lambda (f) (code:comment @#,elem{no definitions})
(printf "running\n") (printf "running\n")
(f 0)) (f 0))
(lambda (f) (code:comment #, @elem{one definition}) (lambda (f) (code:comment @#,elem{one definition})
(define (log-it what) (define (log-it what)
(printf "~a\n")) (printf "~a\n"))
(log-it "running") (log-it "running")
(f 0) (f 0)
(log-it "done")) (log-it "done"))
(lambda (f n) (code:comment #, @elem{two definitions}) (lambda (f n) (code:comment @#,elem{two definitions})
(define (call n) (define (call n)
(if (zero? n) (if (zero? n)
(log-it "done") (log-it "done")

View File

@ -43,15 +43,15 @@ PLT Scheme tools in their default modes do not conform to @|r5rs|,
mainly because PLT Scheme tools generally expect modules, and @|r5rs| mainly because PLT Scheme tools generally expect modules, and @|r5rs|
does not define a module system. Typical single-file @|r5rs| programs does not define a module system. Typical single-file @|r5rs| programs
can be converted to PLT Scheme programs by prefixing them with can be converted to PLT Scheme programs by prefixing them with
@scheme[#, @hash-lang[] #, @schememodname[r5rs]], but other Scheme @scheme[@#,hash-lang[] @#,schememodname[r5rs]], but other Scheme
systems do not recognize @scheme[#, @hash-lang[] #, systems do not recognize @scheme[@#,hash-lang[]
@schememodname[r5rs]]. The @exec{plt-r5rs} executable (see @#,schememodname[r5rs]]. The @exec{plt-r5rs} executable (see
@secref[#:doc '(lib "r5rs/r5rs.scrbl") "plt-r5rs"]) more directly @secref[#:doc '(lib "r5rs/r5rs.scrbl") "plt-r5rs"]) more directly
conforms to the @|r5rs| standard. conforms to the @|r5rs| standard.
Aside from the module system, the syntactic forms and functions of Aside from the module system, the syntactic forms and functions of
@|r5rs| and PLT Scheme differ. Only simple @|r5rs| become PLT Scheme @|r5rs| and PLT Scheme differ. Only simple @|r5rs| become PLT Scheme
programs when prefixed with @scheme[#, @hash-lang[] scheme], and programs when prefixed with @scheme[@#,hash-lang[] scheme], and
relatively few PLT Scheme programs become @|r5rs| programs when a relatively few PLT Scheme programs become @|r5rs| programs when a
@hash-lang[] line is removed. Also, when mixing ``@|r5rs| modules'' @hash-lang[] line is removed. Also, when mixing ``@|r5rs| modules''
with PLT Scheme modules, beware that @|r5rs| pairs correspond to PLT with PLT Scheme modules, beware that @|r5rs| pairs correspond to PLT
@ -119,7 +119,7 @@ including the following:
Each of these languages is used by starting module with the language Each of these languages is used by starting module with the language
name after @hash-lang[]. For example, this source of this name after @hash-lang[]. For example, this source of this
document starts with @scheme[#, @hash-lang[] scribble/doc]. document starts with @scheme[@#,hash-lang[] scribble/doc].
PLT Scheme users can define their own languages. A language name maps PLT Scheme users can define their own languages. A language name maps
to its implementation through a module path by adding to its implementation through a module path by adding
@ -134,11 +134,11 @@ Some language names act as language loaders. For example,
@schememodname[s-exp] as a language uses the usual PLT Scheme parser @schememodname[s-exp] as a language uses the usual PLT Scheme parser
for surface-syntax reading, and then it uses the module path after for surface-syntax reading, and then it uses the module path after
@schememodname[s-exp] for the language's syntactic forms. Thus, @schememodname[s-exp] for the language's syntactic forms. Thus,
@scheme[#, @hash-lang[] #, @schememodname[s-exp] "mylang.ss"] parses @scheme[@#,hash-lang[] @#,schememodname[s-exp] "mylang.ss"] parses
the module body using the normal PLT Scheme reader, by then imports the module body using the normal PLT Scheme reader, by then imports
the initial syntax and functions for the module body from the initial syntax and functions for the module body from
@scheme["mylang.ss"]. Similarly, @scheme[#, @hash-lang[] #, @scheme["mylang.ss"]. Similarly, @scheme[@#,hash-lang[]
@schememodname[planet] _planet-path] loads a language via @#,schememodname[planet] _planet-path] loads a language via
@seclink["top" #:doc '(lib "planet/planet.scrbl")]{@|PLaneT|}. @seclink["top" #:doc '(lib "planet/planet.scrbl")]{@|PLaneT|}.
@; -------------------------------------------------- @; --------------------------------------------------

View File

@ -421,14 +421,14 @@ fast-parallel-seq (in-parallel fast-seq ...)
@examples[ @examples[
(time (for ([i (in-range 100000)]) (time (for ([i (in-range 100000)])
(for ([elem (in-list '(a b c d e f g h))]) (code:comment #, @elem{fast}) (for ([elem (in-list '(a b c d e f g h))]) (code:comment @#,elem{fast})
(void)))) (void))))
(time (for ([i (in-range 100000)]) (time (for ([i (in-range 100000)])
(for ([elem '(a b c d e f g h)]) (code:comment #, @elem{slower}) (for ([elem '(a b c d e f g h)]) (code:comment @#,elem{slower})
(void)))) (void))))
(time (let ([seq (in-list '(a b c d e f g h))]) (time (let ([seq (in-list '(a b c d e f g h))])
(for ([i (in-range 100000)]) (for ([i (in-range 100000)])
(for ([elem seq]) (code:comment #, @elem{slower}) (for ([elem seq]) (code:comment @#,elem{slower})
(void))))) (void)))))
] ]

View File

@ -172,7 +172,7 @@ ports.
@examples[ @examples[
#:eval io-eval #:eval io-eval
(display "Hi") (display "Hi")
(code:line (display "Hi" (current-output-port)) (code:comment #, @t{the same})) (code:line (display "Hi" (current-output-port)) (code:comment @#,t{the same}))
] ]
If you start the @exec{mzscheme} program in a terminal, then the If you start the @exec{mzscheme} program in a terminal, then the

View File

@ -37,12 +37,12 @@ run-time flags and enumerations, use symbols instead of keywords. The
example below illustrates the distinct roles of keywords and symbols. example below illustrates the distinct roles of keywords and symbols.
@examples[ @examples[
(code:line (define dir (find-system-path 'temp-dir)) (code:comment #, @t{not @scheme['#:temp-dir]})) (code:line (define dir (find-system-path 'temp-dir)) (code:comment @#,t{not @scheme['#:temp-dir]}))
(with-output-to-file (build-path dir "stuff.txt") (with-output-to-file (build-path dir "stuff.txt")
(lambda () (printf "example\n")) (lambda () (printf "example\n"))
(code:comment #, @t{optional @scheme[#:mode] argument can be @scheme['text] or @scheme['binary]}) (code:comment @#,t{optional @scheme[#:mode] argument can be @scheme['text] or @scheme['binary]})
#:mode 'text #:mode 'text
(code:comment #, @t{optional @scheme[#:exists] argument can be @scheme['replace], @scheme['truncate], ...}) (code:comment @#,t{optional @scheme[#:exists] argument can be @scheme['replace], @scheme['truncate], ...})
#:exists 'replace) #:exists 'replace)
] ]

View File

@ -45,7 +45,7 @@ value:
(let ([+ (lambda (x y) (let ([+ (lambda (x y)
(if (string? x) (if (string? x)
(string-append x y) (string-append x y)
(+ x y)))]) (code:comment #, @t{use original @scheme[+]}) (+ x y)))]) (code:comment @#,t{use original @scheme[+]})
(list (+ 1 2) (list (+ 1 2)
(+ "see" "saw"))) (+ "see" "saw")))
] ]

View File

@ -35,12 +35,12 @@ parentheses for expressions are brown.
Many predefined functions operate on lists. Here are a few examples: Many predefined functions operate on lists. Here are a few examples:
@interaction[ @interaction[
(code:line (length (list "hop" "skip" "jump")) (code:comment #, @t{count the elements})) (code:line (length (list "hop" "skip" "jump")) (code:comment @#,t{count the elements}))
(code:line (list-ref (list "hop" "skip" "jump") 0) (code:comment #, @t{extract by position})) (code:line (list-ref (list "hop" "skip" "jump") 0) (code:comment @#,t{extract by position}))
(list-ref (list "hop" "skip" "jump") 1) (list-ref (list "hop" "skip" "jump") 1)
(code:line (append (list "hop" "skip") (list "jump")) (code:comment #, @t{combine lists})) (code:line (append (list "hop" "skip") (list "jump")) (code:comment @#,t{combine lists}))
(code:line (reverse (list "hop" "skip" "jump")) (code:comment #, @t{reverse order})) (code:line (reverse (list "hop" "skip" "jump")) (code:comment @#,t{reverse order}))
(code:line (member "fall" (list "hop" "skip" "jump")) (code:comment #, @t{check for an element})) (code:line (member "fall" (list "hop" "skip" "jump")) (code:comment @#,t{check for an element}))
] ]
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@ -220,12 +220,12 @@ argument @scheme[len]:
@schemeblock[ @schemeblock[
(define (my-length lst) (define (my-length lst)
(code:comment #, @t{local function @scheme[iter]:}) (code:comment @#,t{local function @scheme[iter]:})
(define (iter lst len) (define (iter lst len)
(cond (cond
[(empty? lst) len] [(empty? lst) len]
[else (iter (rest lst) (+ len 1))])) [else (iter (rest lst) (+ len 1))]))
(code:comment #, @t{body of @scheme[my-length] calls @scheme[iter]:}) (code:comment @#,t{body of @scheme[my-length] calls @scheme[iter]:})
(iter lst 0)) (iter lst 0))
] ]

View File

@ -16,7 +16,7 @@ scheme
(provide print-cake) (provide print-cake)
(code:comment #, @t{draws a cake with @scheme[n] candles}) (code:comment @#,t{draws a cake with @scheme[n] candles})
(define (print-cake n) (define (print-cake n)
(printf " ~a \n" (make-string n #\.)) (printf " ~a \n" (make-string n #\.))
(printf " .-~a-.\n" (make-string n #\|)) (printf " .-~a-.\n" (make-string n #\|))
@ -76,9 +76,9 @@ scheme
(require setup/dirs) (require setup/dirs)
(find-collects-dir) (code:comment #, @t{main collection directory}) (find-collects-dir) (code:comment @#,t{main collection directory})
(find-user-collects-dir) (code:comment #, @t{user-specific collection directory}) (find-user-collects-dir) (code:comment @#,t{user-specific collection directory})
(get-collects-search-dirs) (code:comment #, @t{complete search path}) (get-collects-search-dirs) (code:comment @#,t{complete search path})
] ]
We discuss more forms of module reference later in We discuss more forms of module reference later in

View File

@ -116,7 +116,7 @@ is used as the path if no sub-path element is supplied.
@examples[ @examples[
(eval:alts (eval:alts
(module m (lib "scheme") (module m (lib "scheme")
(code:comment #, @t{Use @filepath{schematics}'s @filepath{random.plt} 1.0, file @filepath{random.ss}:}) (code:comment @#,t{Use @filepath{schematics}'s @filepath{random.plt} 1.0, file @filepath{random.ss}:})
(require (planet schematics/random:1/random)) (require (planet schematics/random:1/random))
(display (random-gaussian))) (display (random-gaussian)))
(void)) (void))

View File

@ -156,7 +156,7 @@ explicitly and install it for the call to eval:
scheme scheme
(define ns (make-base-namespace)) (define ns (make-base-namespace))
(eval '(cons 1 2) ns) (code:comment #, @t{works}) (eval '(cons 1 2) ns) (code:comment @#,t{works})
] ]
The @scheme[make-base-namespace] function creates a namespace that is The @scheme[make-base-namespace] function creates a namespace that is
@ -209,7 +209,7 @@ scheme
(define x 1) (define x 1)
(define y 2) (define y 2)
(eval '(cons x y) ns) (code:comment #, @t{produces @schemeresult[(1 . 2)]}) (eval '(cons x y) ns) (code:comment @#,t{produces @schemeresult[(1 . 2)]})
] ]
@ -332,7 +332,7 @@ again will create a distinct class datatype:
(class? object%) (class? object%)
(class? (class?
(parameterize ([current-namespace (make-base-empty-namespace)]) (parameterize ([current-namespace (make-base-empty-namespace)])
(namespace-require 'scheme/class) (code:comment #, @t{loads again}) (namespace-require 'scheme/class) (code:comment @#,t{loads again})
(eval 'object%))) (eval 'object%)))
] ]
@ -351,7 +351,7 @@ shared:
'scheme/class 'scheme/class
ns) ns)
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns])
(namespace-require 'scheme/class) (code:comment #, @t{uses attached}) (namespace-require 'scheme/class) (code:comment @#,t{uses attached})
(eval 'object%)))) (eval 'object%))))
] ]

View File

@ -57,8 +57,8 @@ interpretation of digits.
@examples[ @examples[
0.5 0.5
(eval:alts #, @schemevalfont{#e0.5} 1/2) (eval:alts @#,schemevalfont{#e0.5} 1/2)
(eval:alts #, @schemevalfont{#x03BB} #x03BB) (eval:alts @#,schemevalfont{#x03BB} #x03BB)
] ]
Computations that involve an inexact number produce inexact results, Computations that involve an inexact number produce inexact results,
@ -82,8 +82,8 @@ representing real numbers that are not rational. Scheme can represent
only rational numbers and complex numbers with rational parts. only rational numbers and complex numbers with rational parts.
@examples[ @examples[
(code:line (sin 0) (code:comment #, @t{rational...})) (code:line (sin 0) (code:comment @#,t{rational...}))
(code:line (sin 1/2) (code:comment #, @t{not rational...})) (code:line (sin 1/2) (code:comment @#,t{not rational...}))
] ]
In terms of performance, computations with small integers are In terms of performance, computations with small integers are

View File

@ -160,8 +160,8 @@ so that
@schemeblock[ @schemeblock[
(let ([red 1] [green 2] [blue 3]) (let ([red 1] [green 2] [blue 3])
(rotate red green) (code:comment #, @t{swaps}) (rotate red green) (code:comment @#,t{swaps})
(rotate red green blue) (code:comment #, @t{rotates left}) (rotate red green blue) (code:comment @#,t{rotates left})
(list red green blue)) (list red green blue))
] ]
@ -395,7 +395,7 @@ module, which lets us write @scheme[define-cbr] easily enough:
(set! actual v)) (set! actual v))
(... ...))])) (... ...))]))
(define-for-cbr do-f (arg ...) (define-for-cbr do-f (arg ...)
() (code:comment #, @t{explained below...}) () (code:comment @#,t{explained below...})
body))) body)))
] ]

View File

@ -47,7 +47,7 @@ more typically used for symbols and lists, which have other meanings
An expression An expression
@specform[(quote #, @schemevarfont{datum})] @specform[(quote @#,schemevarfont{datum})]
is a shorthand for is a shorthand for

View File

@ -519,8 +519,8 @@ is represented by @scheme[#f]
@interaction[ @interaction[
(define date-re (define date-re
(code:comment #, @t{match `month year' or `month day, year';}) (code:comment @#,t{match `month year' or `month day, year';})
(code:comment #, @t{subpattern matches day, if present}) (code:comment @#,t{subpattern matches day, if present})
#rx"([a-z]+) +([0-9]+,)? *([0-9]+)") #rx"([a-z]+) +([0-9]+,)? *([0-9]+)")
(regexp-match date-re "jan 1, 1970") (regexp-match date-re "jan 1, 1970")
(regexp-match date-re "jan 1970") (regexp-match date-re "jan 1970")
@ -863,11 +863,11 @@ First, we define a subregexp @scheme[n0-255] that matches 0 through
(define n0-255 (define n0-255
(string-append (string-append
"(?:" "(?:"
"\\d|" (code:comment #, @t{ 0 through 9}) "\\d|" (code:comment @#,t{ 0 through 9})
"\\d\\d|" (code:comment #, @t{ 00 through 99}) "\\d\\d|" (code:comment @#,t{ 00 through 99})
"[01]\\d\\d|" (code:comment #, @t{000 through 199}) "[01]\\d\\d|" (code:comment @#,t{000 through 199})
"2[0-4]\\d|" (code:comment #, @t{200 through 249}) "2[0-4]\\d|" (code:comment @#,t{200 through 249})
"25[0-5]" (code:comment #, @t{250 through 255}) "25[0-5]" (code:comment @#,t{250 through 255})
")")) ")"))
] ]
@ -892,14 +892,14 @@ three dots separating them.
#:eval ex-eval #:eval ex-eval
(define ip-re1 (define ip-re1
(string-append (string-append
"^" (code:comment #, @t{nothing before}) "^" (code:comment @#,t{nothing before})
n0-255 (code:comment #, @t{the first @scheme[n0-255],}) n0-255 (code:comment @#,t{the first @scheme[n0-255],})
"(?:" (code:comment #, @t{then the subpattern of}) "(?:" (code:comment @#,t{then the subpattern of})
"\\." (code:comment #, @t{a dot followed by}) "\\." (code:comment @#,t{a dot followed by})
n0-255 (code:comment #, @t{an @scheme[n0-255],}) n0-255 (code:comment @#,t{an @scheme[n0-255],})
")" (code:comment #, @t{which is}) ")" (code:comment @#,t{which is})
"{3}" (code:comment #, @t{repeated exactly 3 times}) "{3}" (code:comment @#,t{repeated exactly 3 times})
"$" (code:comment #, @t{with nothing following}) "$" (code:comment @#,t{with nothing following})
)) ))
] ]
@ -928,7 +928,7 @@ ensure there @emph{is} a digit other than zero.
(define ip-re (define ip-re
(pregexp (pregexp
(string-append (string-append
"(?=.*[1-9])" (code:comment #, @t{ensure there's a non-0 digit}) "(?=.*[1-9])" (code:comment @#,t{ensure there's a non-0 digit})
ip-re1))) ip-re1)))
] ]
@ -940,8 +940,8 @@ composed of @emph{only} zeros and dots.
(define ip-re (define ip-re
(pregexp (pregexp
(string-append (string-append
"(?![0.]*$)" (code:comment #, @t{not just zeros and dots}) "(?![0.]*$)" (code:comment @#,t{not just zeros and dots})
(code:comment #, @t{(note: @litchar{.} is not metachar inside @litchar{[}...@litchar{]})}) (code:comment @#,t{(note: @litchar{.} is not metachar inside @litchar{[}...@litchar{]})})
ip-re1))) ip-re1)))
] ]

View File

@ -188,7 +188,7 @@ individually to the @scheme[_id]s using @scheme[set!].
(set! l (+ l 1))) (set! l (+ l 1)))
(begin0 (begin0
(values w l) (values w l)
(code:comment #, @t{swap sides...}) (code:comment @#,t{swap sides...})
(set!-values (w l) (values l w)))))) (set!-values (w l) (values l w))))))
(game #t) (game #t)
(game #t) (game #t)

View File

@ -11,7 +11,7 @@
A program module is written as A program module is written as
@schemeblock[ @schemeblock[
#, @BNF-seq[@litchar{#lang} @nonterm{langname} @kleenestar{@nonterm{topform}}] @#,BNF-seq[@litchar{#lang} @nonterm{langname} @kleenestar{@nonterm{topform}}]
] ]
where a @nonterm{topform} is either a @nonterm{definition} or an where a @nonterm{topform} is either a @nonterm{definition} or an
@ -67,11 +67,11 @@ A definition of the form
@moreguide["define"]{definitions} @moreguide["define"]{definitions}
@schemeblock[#, @val-defn-stx] @schemeblock[@#,val-defn-stx]
binds @nonterm{id} to the result of @nonterm{expr}, while binds @nonterm{id} to the result of @nonterm{expr}, while
@schemeblock[#, @fun-defn-stx] @schemeblock[@#,fun-defn-stx]
binds the first @nonterm{id} to a function (also called a binds the first @nonterm{id} to a function (also called a
@defterm{procedure}) that takes arguments as named by the remaining @defterm{procedure}) that takes arguments as named by the remaining
@ -81,9 +81,9 @@ the last @nonterm{expr}.
@defexamples[ @defexamples[
#:eval ex-eval #:eval ex-eval
(code:line (define pie 3) (code:comment #, @t{defines @scheme[pie] to be @scheme[3]})) (code:line (define pie 3) (code:comment @#,t{defines @scheme[pie] to be @scheme[3]}))
(code:line (define (piece str) (code:comment #, @t{defines @scheme[piece] as a function}) (code:line (define (piece str) (code:comment @#,t{defines @scheme[piece] as a function})
(substring str 0 pie)) (code:comment #, @t{ of one argument})) (substring str 0 pie)) (code:comment @#,t{ of one argument}))
pie pie
(piece "key lime") (piece "key lime")
] ]
@ -192,12 +192,12 @@ identifiers, as opposed to arithmetic expressions. Here are several
more examples: more examples:
@schemeblock[ @schemeblock[
#, @schemeid[+] @#,schemeid[+]
#, @schemeid[Hfuhruhurr] @#,schemeid[Hfuhruhurr]
#, @schemeid[integer?] @#,schemeid[integer?]
#, @schemeid[pass/fail] @#,schemeid[pass/fail]
#, @schemeid[john-jacob-jingleheimer-schmidt] @#,schemeid[john-jacob-jingleheimer-schmidt]
#, @schemeid[a-b-c+1-2-3] @#,schemeid[a-b-c+1-2-3]
] ]
@;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -225,20 +225,20 @@ pre-defined names are hyperlinked to the reference manual. So, you can
click on an identifier to get full details about its use. click on an identifier to get full details about its use.
@interaction[ @interaction[
(code:line (string-append "rope" "twine" "yarn") (code:comment #, @t{append strings})) (code:line (string-append "rope" "twine" "yarn") (code:comment @#,t{append strings}))
(code:line (substring "corduroys" 0 4) (code:comment #, @t{extract a substring})) (code:line (substring "corduroys" 0 4) (code:comment @#,t{extract a substring}))
(code:line (string-length "shoelace") (code:comment #, @t{get a string's length})) (code:line (string-length "shoelace") (code:comment @#,t{get a string's length}))
(code:line (string? "c'est ne pas une string") (code:comment #, @t{recognize strings})) (code:line (string? "c'est ne pas une string") (code:comment @#,t{recognize strings}))
(string? 1) (string? 1)
(code:line (sqrt 16) (code:comment #, @t{find a square root})) (code:line (sqrt 16) (code:comment @#,t{find a square root}))
(sqrt -16) (sqrt -16)
(code:line (+ 1 2) (code:comment #, @t{add numbers})) (code:line (+ 1 2) (code:comment @#,t{add numbers}))
(code:line (- 2 1) (code:comment #, @t{subtract numbers})) (code:line (- 2 1) (code:comment @#,t{subtract numbers}))
(code:line (< 2 1) (code:comment #, @t{compare numbers})) (code:line (< 2 1) (code:comment @#,t{compare numbers}))
(>= 2 1) (>= 2 1)
(code:line (number? "c'est une number") (code:comment #, @t{recognize numbers})) (code:line (number? "c'est une number") (code:comment @#,t{recognize numbers}))
(number? 1) (number? 1)
(code:line (equal? 6 "half dozen") (code:comment #, @t{compare anything})) (code:line (equal? 6 "half dozen") (code:comment @#,t{compare anything}))
(equal? 6 6) (equal? 6 6)
(equal? "half dozen" "half dozen") (equal? "half dozen" "half dozen")
] ]
@ -506,8 +506,8 @@ function. In other words, the @scheme[lambda]-generated function
(twice louder "really") (twice louder "really")
] ]
We have so far referred to definitions of the form @scheme[(define #, We have so far referred to definitions of the form @scheme[(define
@nonterm{id} #, @nonterm{expr})] as ``non-function @#,nonterm{id} @#,nonterm{expr})] as ``non-function
definitions.'' This characterization is misleading, because the definitions.'' This characterization is misleading, because the
@nonterm{expr} could be a @scheme[lambda] form, in which case @nonterm{expr} could be a @scheme[lambda] form, in which case
the definition is equivalent to using the ``function'' definition the definition is equivalent to using the ``function'' definition
@ -550,8 +550,8 @@ function body.
@defexamples[ @defexamples[
(define (converse s) (define (converse s)
(define (starts? s2) (code:comment #, @t{local to @scheme[converse]}) (define (starts? s2) (code:comment @#,t{local to @scheme[converse]})
(define len2 (string-length s2)) (code:comment #, @t{local to @scheme[starts?]}) (define len2 (string-length s2)) (code:comment @#,t{local to @scheme[starts?]})
(and (>= (string-length s) len2) (and (>= (string-length s) len2)
(equal? s2 (substring s 0 len2)))) (equal? s2 (substring s 0 len2))))
(cond (cond
@ -560,7 +560,7 @@ function body.
[else "huh?"])) [else "huh?"]))
(converse "hello!") (converse "hello!")
(converse "urp") (converse "urp")
(eval:alts (code:line starts? (code:comment #, @t{outside of @scheme[converse], so...})) (eval:alts (code:line starts? (code:comment @#,t{outside of @scheme[converse], so...}))
(parameterize ([current-namespace (make-base-namespace)]) (eval 'starts?))) (parameterize ([current-namespace (make-base-namespace)]) (eval 'starts?)))
] ]

View File

@ -30,7 +30,7 @@ arrive at a symbol, but the reader preserves case by default.
(eq? 'a (string->symbol "a")) (eq? 'a (string->symbol "a"))
(eq? 'a 'b) (eq? 'a 'b)
(eq? 'a 'A) (eq? 'a 'A)
(eval:alts #, @elem{@schemefont{#ci}@schemevalfont{'A}} #ci'A) (eval:alts @#,elem{@schemefont{#ci}@schemevalfont{'A}} #ci'A)
] ]
Any string (i.e., any character sequence) can be supplied to Any string (i.e., any character sequence) can be supplied to

View File

@ -87,9 +87,9 @@ lists that prints as @schemeresult[((1) (2) (3))]. The @scheme[quote]
form does exactly that: form does exactly that:
@interaction[ @interaction[
(eval:alts (#, @scheme[quote] ((1) (2) (3))) '((1) (2) (3))) (eval:alts (@#,scheme[quote] ((1) (2) (3))) '((1) (2) (3)))
(eval:alts (#, @scheme[quote] ("red" "green" "blue")) '("red" "green" "blue")) (eval:alts (@#,scheme[quote] ("red" "green" "blue")) '("red" "green" "blue"))
(eval:alts (#, @scheme[quote] ()) '()) (eval:alts (@#,scheme[quote] ()) '())
] ]
The @scheme[quote] form works with the dot notation, too, whether the The @scheme[quote] form works with the dot notation, too, whether the
@ -97,29 +97,29 @@ quoted form is normalized by the dot-parenthesis elimination rule or
not: not:
@interaction[ @interaction[
(eval:alts (#, @scheme[quote] (1 . 2)) '(1 . 2)) (eval:alts (@#,scheme[quote] (1 . 2)) '(1 . 2))
(eval:alts (#, @scheme[quote] (0 #, @schemeparenfont{.} (1 . 2))) '(0 . (1 . 2))) (eval:alts (@#,scheme[quote] (0 @#,schemeparenfont{.} (1 . 2))) '(0 . (1 . 2)))
] ]
Naturally, lists of any kind can be nested: Naturally, lists of any kind can be nested:
@interaction[ @interaction[
(list (list 1 2 3) 5 (list "a" "b" "c")) (list (list 1 2 3) 5 (list "a" "b" "c"))
(eval:alts (#, @scheme[quote] ((1 2 3) 5 ("a" "b" "c"))) '((1 2 3) 5 ("a" "b" "c"))) (eval:alts (@#,scheme[quote] ((1 2 3) 5 ("a" "b" "c"))) '((1 2 3) 5 ("a" "b" "c")))
] ]
If you wrap an identifier with @scheme[quote], then you get output If you wrap an identifier with @scheme[quote], then you get output
that looks like an identifier: that looks like an identifier:
@interaction[ @interaction[
(eval:alts (#, @scheme[quote] jane-doe) 'jane-doe) (eval:alts (@#,scheme[quote] jane-doe) 'jane-doe)
] ]
A value that prints like an identifier is a @defterm{symbol}. In the A value that prints like an identifier is a @defterm{symbol}. In the
same way that parenthesized output should not be confused with same way that parenthesized output should not be confused with
expressions, a printed symbol should not be confused with an expressions, a printed symbol should not be confused with an
identifier. In particular, the symbol @scheme[(#, @scheme[quote] #, identifier. In particular, the symbol @scheme[(@#,scheme[quote]
@schemeidfont{map})] has nothing to do with the @schemeidfont{map} @#,schemeidfont{map})] has nothing to do with the @schemeidfont{map}
identifier or the predefined function that is bound to identifier or the predefined function that is bound to
@scheme[map], except that the symbol and the identifier happen @scheme[map], except that the symbol and the identifier happen
to be made up of the same letters. to be made up of the same letters.
@ -132,27 +132,27 @@ them.
@examples[ @examples[
map map
(eval:alts (#, @scheme[quote] #, @schemeidfont{map}) 'map) (eval:alts (@#,scheme[quote] @#,schemeidfont{map}) 'map)
(eval:alts (symbol? (#, @scheme[quote] #, @schemeidfont{map})) (symbol? 'map)) (eval:alts (symbol? (@#,scheme[quote] @#,schemeidfont{map})) (symbol? 'map))
(symbol? map) (symbol? map)
(procedure? map) (procedure? map)
(string->symbol "map") (string->symbol "map")
(eval:alts (symbol->string (#, @scheme[quote] #, @schemeidfont{map})) (symbol->string 'map)) (eval:alts (symbol->string (@#,scheme[quote] @#,schemeidfont{map})) (symbol->string 'map))
] ]
When @scheme[quote] is used on a parenthesized sequence of When @scheme[quote] is used on a parenthesized sequence of
identifiers, it creates a list of symbols: identifiers, it creates a list of symbols:
@interaction[ @interaction[
(eval:alts (#, @scheme[quote] (#, @schemeidfont{road} #, @schemeidfont{map})) '(road map)) (eval:alts (@#,scheme[quote] (@#,schemeidfont{road} @#,schemeidfont{map})) '(road map))
(eval:alts (car (#, @scheme[quote] (#, @schemeidfont{road} #, @schemeidfont{map}))) (car '(road map))) (eval:alts (car (@#,scheme[quote] (@#,schemeidfont{road} @#,schemeidfont{map}))) (car '(road map)))
(eval:alts (symbol? (car (#, @scheme[quote] (#, @schemeidfont{road} #, @schemeidfont{map})))) (symbol? (car '(road map)))) (eval:alts (symbol? (car (@#,scheme[quote] (@#,schemeidfont{road} @#,schemeidfont{map})))) (symbol? (car '(road map))))
] ]
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@section{Abbreviating @scheme[quote] with @schemevalfont{'}} @section{Abbreviating @scheme[quote] with @schemevalfont{'}}
If @scheme[(#, @scheme[quote] (1 2 3))] still seems like too much If @scheme[(@#,scheme[quote] (1 2 3))] still seems like too much
typing, you can abbreviate by just putting @litchar{'} in front of typing, you can abbreviate by just putting @litchar{'} in front of
@scheme[(1 2 3)]: @scheme[(1 2 3)]:
@ -175,7 +175,7 @@ way. You can see this if you put a @litchar{'} in front of a form that has a
@litchar{'}: @litchar{'}:
@interaction[ @interaction[
(eval:alts (car '(#, @schemevalfont{quote} #, @schemevalfont{road})) 'quote) (eval:alts (car '(@#,schemevalfont{quote} @#,schemevalfont{road})) 'quote)
(car ''road) (car ''road)
] ]
@ -186,7 +186,7 @@ Beware, however, that the @tech{REPL}'s printer recognizes the symbol
@interaction[ @interaction[
'road 'road
''road ''road
(eval:alts '(#, @schemevalfont{quote} #, @schemevalfont{road}) ''road) (eval:alts '(@#,schemevalfont{quote} @#,schemevalfont{road}) ''road)
] ]
@; FIXME: @; FIXME:
@ -223,10 +223,10 @@ One consequence of the read layer for expressions is that you can use
the dot notation in expressions that are not quoted forms: the dot notation in expressions that are not quoted forms:
@interaction[ @interaction[
(eval:alts (+ 1 . #, @scheme[(2)]) (+ 1 2)) (eval:alts (+ 1 . @#,scheme[(2)]) (+ 1 2))
] ]
This works because @scheme[(+ 1 . #, @scheme[(2)])] is just another This works because @scheme[(+ 1 . @#,scheme[(2)])] is just another
way of writing @scheme[(+ 1 2)]. It is practically never a good idea way of writing @scheme[(+ 1 2)]. It is practically never a good idea
to write application expressions using this dot notation; it's just a to write application expressions using this dot notation; it's just a
consequence of the way Scheme's syntax is defined. consequence of the way Scheme's syntax is defined.

View File

@ -322,7 +322,7 @@ scheme
(define (store-color) the-color) (define (store-color) the-color)
(code:comment #, @t{the rest is the same as before}) (code:comment @#,t{the rest is the same as before})
(define (maybe-repaint t) (define (maybe-repaint t)
(if (eq? (toy-color t) (store-color)) (if (eq? (toy-color t) (store-color))

View File

@ -19,8 +19,8 @@ represent symbols and lists.
@refdetails/gory["parse-vector"]{the syntax of vectors} @refdetails/gory["parse-vector"]{the syntax of vectors}
@examples[ @examples[
(eval:alts #, @schemevalfont{#("a" "b" "c")} #("a" "b" "c")) (eval:alts @#,schemevalfont{#("a" "b" "c")} #("a" "b" "c"))
(eval:alts #, @schemevalfont{#(name (that tune))} #(name (that tune))) (eval:alts @#,schemevalfont{#(name (that tune))} #(name (that tune)))
(vector-ref #("a" "b" "c") 1) (vector-ref #("a" "b" "c") 1)
(vector-ref #(name (that tune)) 1) (vector-ref #(name (that tune)) 1)
] ]

View File

@ -67,7 +67,7 @@
(let id ([id expr] ...) expr) (let id ([id expr] ...) expr)
(let* ([id expr] ...) expr) (let* ([id expr] ...) expr)
(recur id ([id expr] ...) expr) (recur id ([id expr] ...) expr)
(code:line (expr expr ...) (code:comment #, @seclink["advanced-call"]{function call})) (code:line (expr expr ...) (code:comment @#,seclink["advanced-call"]{function call}))
(cond [expr expr] ... [expr expr]) (cond [expr expr] ... [expr expr])
(cond [expr expr] ... [else expr]) (cond [expr expr] ... [else expr])
(case expr [(choice choice ...) expr] ... (case expr [(choice choice ...) expr] ...
@ -81,17 +81,17 @@
(or expr expr expr ...) (or expr expr expr ...)
(time expr) (time expr)
empty empty
(code:line id (code:comment #, @seclink["intermediate-id"]{identifier})) (code:line id (code:comment @#,seclink["intermediate-id"]{identifier}))
(code:line prim-op (code:comment #, @seclink["intermediate-lambda-prim-op"]{primitive operation})) (code:line prim-op (code:comment @#,seclink["intermediate-lambda-prim-op"]{primitive operation}))
'id 'id
(code:line #, @elem{@schemevalfont{'}@scheme[quoted]} (code:comment #, @seclink["beginner-abbr-quote"]{quoted value})) (code:line @#,elem{@schemevalfont{'}@scheme[quoted]} (code:comment @#,seclink["beginner-abbr-quote"]{quoted value}))
(code:line #, @elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment #, @seclink["beginner-abbr-quasiquote"]{quasiquote})) (code:line @#,elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment @#,seclink["beginner-abbr-quasiquote"]{quasiquote}))
number number
true true
false false
string string
character] character]
[choice (code:line id (code:comment #, @t{treated as a symbol})) [choice (code:line id (code:comment @#,t{treated as a symbol}))
number] number]
] ]

View File

@ -35,8 +35,8 @@
(define id expr) (define id expr)
(define id (lambda (id id ...) expr)) (define id (lambda (id id ...) expr))
(define-struct id (id ...))] (define-struct id (id ...))]
[expr (code:line (id expr expr ...) (code:comment #, @seclink["beginner-call"]{function call})) [expr (code:line (id expr expr ...) (code:comment @#,seclink["beginner-call"]{function call}))
(code:line (prim-op expr ...) (code:comment #, @seclink["beginner-prim-call"]{primitive operation call})) (code:line (prim-op expr ...) (code:comment @#,seclink["beginner-prim-call"]{primitive operation call}))
(cond [expr expr] ... [expr expr]) (cond [expr expr] ... [expr expr])
(cond [expr expr] ... [else expr]) (cond [expr expr] ... [else expr])
(if expr expr expr) (if expr expr expr)
@ -44,8 +44,8 @@
(or expr expr expr ...) (or expr expr expr ...)
empty empty
id id
(code:line #, @elem{@schemevalfont{'}@scheme[quoted]} (code:comment #, @seclink["beginner-abbr-quote"]{quoted value})) (code:line @#,elem{@schemevalfont{'}@scheme[quoted]} (code:comment @#,seclink["beginner-abbr-quote"]{quoted value}))
(code:line #, @elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment #, @seclink["beginner-abbr-quasiquote"]{quasiquote})) (code:line @#,elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment @#,seclink["beginner-abbr-quasiquote"]{quasiquote}))
number number
true true
false false
@ -70,7 +70,7 @@ Creates symbols and abbreviates nested lists.
Normally, this form is written with a @litchar{'}, like Normally, this form is written with a @litchar{'}, like
@scheme['(apple banana)], but it can also be written with @scheme[quote], like @scheme['(apple banana)], but it can also be written with @scheme[quote], like
@scheme[(#, @scheme[quote] (apple banana))].} @scheme[(@#,scheme[quote] (apple banana))].}
@; ---------------------------------------- @; ----------------------------------------
@ -87,7 +87,7 @@ to expression ``unquotes.''
Normally, this form is written with a backquote, @litchar{`}, like Normally, this form is written with a backquote, @litchar{`}, like
@scheme[`(apple ,(+ 1 2))], but it can also be written with @scheme[`(apple ,(+ 1 2))], but it can also be written with
@scheme[quasiquote], like @scheme[quasiquote], like
@scheme[(#, @scheme[quasiquote] (apple ,(+ 1 2)))].} @scheme[(@#,scheme[quasiquote] (apple ,(+ 1 2)))].}
@deftogether[( @deftogether[(

View File

@ -22,8 +22,8 @@
(define id expr) (define id expr)
(define id (lambda (id id ...) expr)) (define id (lambda (id id ...) expr))
(define-struct id (id ...))] (define-struct id (id ...))]
[expr (code:line (id expr expr ...) (code:comment #, @seclink["beginner-call"]{function call})) [expr (code:line (id expr expr ...) (code:comment @#,seclink["beginner-call"]{function call}))
(code:line (prim-op expr ...) (code:comment #, @seclink["beginner-prim-call"]{primitive operation call})) (code:line (prim-op expr ...) (code:comment @#,seclink["beginner-prim-call"]{primitive operation call}))
(cond [expr expr] ... [expr expr]) (cond [expr expr] ... [expr expr])
(cond [expr expr] ... [else expr]) (cond [expr expr] ... [else expr])
(if expr expr expr) (if expr expr expr)
@ -31,8 +31,8 @@
(or expr expr expr ...) (or expr expr expr ...)
empty empty
id id
(code:line id (code:comment #, @seclink["beginner-id"]{identifier})) (code:line id (code:comment @#,seclink["beginner-id"]{identifier}))
(code:line #, @elem{@schemevalfont{'}@scheme[id]} (code:comment #, @seclink["beginner-quote"]{symbol})) (code:line @#,elem{@schemevalfont{'}@scheme[id]} (code:comment @#,seclink["beginner-quote"]{symbol}))
number number
true true
false false
@ -276,7 +276,7 @@ A quoted @scheme[id] is a symbol. A symbol is a constant, like
Normally, a symbol is written with a @litchar{'}, like Normally, a symbol is written with a @litchar{'}, like
@scheme['apple], but it can also be written with @scheme[quote], like @scheme['apple], but it can also be written with @scheme[quote], like
@scheme[(#, @scheme[quote] apple)]. @scheme[(@#,scheme[quote] apple)].
The @scheme[id] for a symbol is a sequence of characters not including The @scheme[id] for a symbol is a sequence of characters not including
a space or one of the following:} a space or one of the following:}

View File

@ -52,7 +52,7 @@
(letrec ([id expr] ...) expr) (letrec ([id expr] ...) expr)
(let ([id expr] ...) expr) (let ([id expr] ...) expr)
(let* ([id expr] ...) expr) (let* ([id expr] ...) expr)
(code:line (expr expr expr ...) (code:comment #, @seclink["intermediate-lambda-call"]{function call})) (code:line (expr expr expr ...) (code:comment @#,seclink["intermediate-lambda-call"]{function call}))
(cond [expr expr] ... [expr expr]) (cond [expr expr] ... [expr expr])
(cond [expr expr] ... [else expr]) (cond [expr expr] ... [else expr])
(if expr expr expr) (if expr expr expr)
@ -60,11 +60,11 @@
(or expr expr expr ...) (or expr expr expr ...)
(time expr) (time expr)
empty empty
(code:line id (code:comment #, @seclink["intermediate-id"]{identifier})) (code:line id (code:comment @#,seclink["intermediate-id"]{identifier}))
(code:line prim-op (code:comment #, @seclink["intermediate-lambda-prim-op"]{primitive operation})) (code:line prim-op (code:comment @#,seclink["intermediate-lambda-prim-op"]{primitive operation}))
'id 'id
(code:line #, @elem{@schemevalfont{'}@scheme[quoted]} (code:comment #, @seclink["beginner-abbr-quote"]{quoted value})) (code:line @#,elem{@schemevalfont{'}@scheme[quoted]} (code:comment @#,seclink["beginner-abbr-quote"]{quoted value}))
(code:line #, @elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment #, @seclink["beginner-abbr-quasiquote"]{quasiquote})) (code:line @#,elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment @#,seclink["beginner-abbr-quasiquote"]{quasiquote}))
number number
true true
false false

View File

@ -38,8 +38,8 @@
(letrec ([id expr-for-let] ...) expr) (letrec ([id expr-for-let] ...) expr)
(let ([id expr-for-let] ...) expr) (let ([id expr-for-let] ...) expr)
(let* ([id expr-for-let] ...) expr) (let* ([id expr-for-let] ...) expr)
(code:line (id expr expr ...) (code:comment #, @seclink["intermediate-call"]{function call})) (code:line (id expr expr ...) (code:comment @#,seclink["intermediate-call"]{function call}))
(code:line (prim-op expr ...) (code:comment #, @seclink["beginner-prim-call"]{primitive operation call})) (code:line (prim-op expr ...) (code:comment @#,seclink["beginner-prim-call"]{primitive operation call}))
(cond [expr expr] ... [expr expr]) (cond [expr expr] ... [expr expr])
(cond [expr expr] ... [else expr]) (cond [expr expr] ... [else expr])
(if expr expr expr) (if expr expr expr)
@ -47,11 +47,11 @@
(or expr expr expr ...) (or expr expr expr ...)
(time expr) (time expr)
empty empty
(code:line id (code:comment #, @seclink["intermediate-id"]{identifier})) (code:line id (code:comment @#,seclink["intermediate-id"]{identifier}))
(code:line prim-op (code:comment #, @seclink["intermediate-prim-op"]{primitive operation})) (code:line prim-op (code:comment @#,seclink["intermediate-prim-op"]{primitive operation}))
'id 'id
(code:line #, @elem{@schemevalfont{'}@scheme[quoted]} (code:comment #, @seclink["beginner-abbr-quote"]{quoted value})) (code:line @#,elem{@schemevalfont{'}@scheme[quoted]} (code:comment @#,seclink["beginner-abbr-quote"]{quoted value}))
(code:line #, @elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment #, @seclink["beginner-abbr-quasiquote"]{quasiquote})) (code:line @#,elem{@schemevalfont{`}@scheme[quasiquoted]} (code:comment @#,seclink["beginner-abbr-quasiquote"]{quasiquote}))
number number
true true
false false

View File

@ -17,15 +17,15 @@
(schemegrammar* (schemegrammar*
#:literals lits #:literals lits
form ... form ...
[test-case #, @scheme[(check-expect expr expr)] [test-case @#,scheme[(check-expect expr expr)]
#, @scheme[(check-within expr expr expr)] @#,scheme[(check-within expr expr expr)]
#, @scheme[(check-error expr expr)]] @#,scheme[(check-error expr expr)]]
(... (...
[library-require #, @scheme[(require string)] [library-require @#,scheme[(require string)]
#, @scheme[(require (lib string string ...))] @#,scheme[(require (lib string string ...))]
#, @scheme[(require (planet string package))]]) @#,scheme[(require (planet string package))]])
(... (...
[package #, @scheme[(string string number number)]]))) [package @#,scheme[(string string number number)]])))
(define-syntax-rule (schemegrammar*+qq (define-syntax-rule (schemegrammar*+qq
#:literals lits #:literals lits
@ -40,21 +40,21 @@
number number
string string
character character
#, @scheme[(quoted ...)] @#,scheme[(quoted ...)]
#, @elem{@schemevalfont{'}@scheme[quoted]} @#,elem{@schemevalfont{'}@scheme[quoted]}
#, @elem{@schemevalfont{`}@scheme[quoted]} @#,elem{@schemevalfont{`}@scheme[quoted]}
#, @elem{@schemefont{,}@scheme[quoted]} @#,elem{@schemefont{,}@scheme[quoted]}
#, @elem{@schemefont[",@"]@scheme[quoted]}]) @#,elem{@schemefont[",@"]@scheme[quoted]}])
(... (...
[quasiquoted id [quasiquoted id
number number
string string
character character
#, @scheme[(quasiquoted ...)] @#,scheme[(quasiquoted ...)]
#, @elem{@schemevalfont{'}@scheme[quasiquoted]} @#,elem{@schemevalfont{'}@scheme[quasiquoted]}
#, @elem{@schemevalfont{`}@scheme[quasiquoted]} @#,elem{@schemevalfont{`}@scheme[quasiquoted]}
#, @elem{@schemefont{,}@scheme[expr]} @#,elem{@schemefont{,}@scheme[expr]}
#, @elem{@schemefont[",@"]@scheme[expr]}]))) @#,elem{@schemefont[",@"]@scheme[expr]}])))
(define prim-nonterms (define prim-nonterms
(make-splice (make-splice

View File

@ -173,9 +173,9 @@ header, and then write a ``Hello, world!'' web page as the result:
@schemeblock[ @schemeblock[
(define (handle in out) (define (handle in out)
(code:comment #, @t{Discard the request header (up to blank line):}) (code:comment @#,t{Discard the request header (up to blank line):})
(regexp-match #rx"(\r\n|^)\r\n" in) (regexp-match #rx"(\r\n|^)\r\n" in)
(code:comment #, @t{Send reply:}) (code:comment @#,t{Send reply:})
(display "HTTP/1.0 200 Okay\r\n" out) (display "HTTP/1.0 200 Okay\r\n" out)
(display "Server: k\r\nContent-Type: text/html\r\n\r\n" out) (display "Server: k\r\nContent-Type: text/html\r\n\r\n" out)
(display "<html><body>Hello, world!</body></html>" out)) (display "<html><body>Hello, world!</body></html>" out))
@ -315,7 +315,7 @@ watcher-thread strategy works well:
(handle in out) (handle in out)
(close-input-port in) (close-input-port in)
(close-output-port out)))) (close-output-port out))))
(code:comment #, @t{Watcher thread:}) (code:comment @#,t{Watcher thread:})
(thread (lambda () (thread (lambda ()
(sleep 10) (sleep 10)
(kill-thread t)))) (kill-thread t))))
@ -346,7 +346,7 @@ custodian:
(handle in out) (handle in out)
(close-input-port in) (close-input-port in)
(close-output-port out)))) (close-output-port out))))
(code:comment #, @t{Watcher thread:}) (code:comment @#,t{Watcher thread:})
(thread (lambda () (thread (lambda ()
(sleep 10) (sleep 10)
(custodian-shutdown-all cust)))) (custodian-shutdown-all cust))))
@ -442,15 +442,15 @@ takes a requested URL and produces a result value suitable to use with
@schemeblock[ @schemeblock[
(define (handle in out) (define (handle in out)
(define req (define req
(code:comment #, @t{Match the first line to extract the request:}) (code:comment @#,t{Match the first line to extract the request:})
(regexp-match #rx"^GET (.+) HTTP/[0-9]+\\.[0-9]+" (regexp-match #rx"^GET (.+) HTTP/[0-9]+\\.[0-9]+"
(read-line in))) (read-line in)))
(when req (when req
(code:comment #, @t{Discard the rest of the header (up to blank line):}) (code:comment @#,t{Discard the rest of the header (up to blank line):})
(regexp-match #rx"(\r\n|^)\r\n" in) (regexp-match #rx"(\r\n|^)\r\n" in)
(code:comment #, @t{Dispatch:}) (code:comment @#,t{Dispatch:})
(let ([xexpr (dispatch (list-ref req 1))]) (let ([xexpr (dispatch (list-ref req 1))])
(code:comment #, @t{Send reply:}) (code:comment @#,t{Send reply:})
(display "HTTP/1.0 200 Okay\r\n" out) (display "HTTP/1.0 200 Okay\r\n" out)
(display "Server: k\r\nContent-Type: text/html\r\n\r\n" out) (display "Server: k\r\nContent-Type: text/html\r\n\r\n" out)
(display (xexpr->string xexpr) out)))) (display (xexpr->string xexpr) out))))
@ -474,16 +474,16 @@ path element, like @scheme["foo"], to a handler function:
@schemeblock[ @schemeblock[
(define (dispatch str-path) (define (dispatch str-path)
(code:comment #, @t{Parse the request as a URL:}) (code:comment @#,t{Parse the request as a URL:})
(define url (string->url str-path)) (define url (string->url str-path))
(code:comment #, @t{Extract the path part:}) (code:comment @#,t{Extract the path part:})
(define path (map path/param-path (url-path url))) (define path (map path/param-path (url-path url)))
(code:comment #, @t{Find a handler based on the path's first element:}) (code:comment @#,t{Find a handler based on the path's first element:})
(define h (hash-ref dispatch-table (car path) #f)) (define h (hash-ref dispatch-table (car path) #f))
(if h (if h
(code:comment #, @t{Call a handler:}) (code:comment @#,t{Call a handler:})
(h (url-query url)) (h (url-query url))
(code:comment #, @t{No handler found:}) (code:comment @#,t{No handler found:})
`(html (head (title "Error")) `(html (head (title "Error"))
(body (body
(font ((color "red")) (font ((color "red"))
@ -684,14 +684,14 @@ Thus, @scheme[get-number] is implemented as follows:
@schemeblock[ @schemeblock[
(define (get-number label) (define (get-number label)
(define query (define query
(code:comment #, @t{Generate a URL for the current computation:}) (code:comment @#,t{Generate a URL for the current computation:})
(send/suspend (send/suspend
(code:comment #, @t{Receive the computation-as-URL here:}) (code:comment @#,t{Receive the computation-as-URL here:})
(lambda (k-url) (lambda (k-url)
(code:comment #, @t{Generate the query-page result for this connection.}) (code:comment @#,t{Generate the query-page result for this connection.})
(code:comment #, @t{Send the query result to the saved-computation URL:}) (code:comment @#,t{Send the query result to the saved-computation URL:})
(build-request-page label k-url "")))) (build-request-page label k-url ""))))
(code:comment #, @t{We arrive here later, in a new connection}) (code:comment @#,t{We arrive here later, in a new connection})
(string->number (cdr (assq 'number query)))) (string->number (cdr (assq 'number query))))
] ]

View File

@ -151,8 +151,8 @@ arguments before the matching close parenthesis:
@mr-schemeblock+eval[ @mr-schemeblock+eval[
(define (square n) (define (square n)
(code:comment #, @t{A semi-colon starts a line comment.}) (code:comment @#,t{A semi-colon starts a line comment.})
(code:comment #, @t{The expression below is the function body.}) (code:comment @#,t{The expression below is the function body.})
(filled-rectangle n n)) (filled-rectangle n n))
] ]

View File

@ -192,16 +192,16 @@ Example:
#:once-any #:once-any
[("-o" "--optimize-1") "Compile with optimization level 1" [("-o" "--optimize-1") "Compile with optimization level 1"
(optimize-level 1)] (optimize-level 1)]
["--optimize-2" ((code:comment #, @t{show help on separate lines}) ["--optimize-2" ((code:comment @#,t{show help on separate lines})
"Compile with optimization level 2," "Compile with optimization level 2,"
"which includes all of level 1") "which includes all of level 1")
(optimize-level 2)] (optimize-level 2)]
#:multi #:multi
[("-l" "--link-flags") lf (code:comment #, @t{flag takes one argument}) [("-l" "--link-flags") lf (code:comment @#,t{flag takes one argument})
"Add a flag <lf> for the linker" "Add a flag <lf> for the linker"
(link-flags (cons lf (link-flags)))] (link-flags (cons lf (link-flags)))]
#:args (filename) (code:comment #, @t{expect one command-line argument: <filename>}) #:args (filename) (code:comment @#,t{expect one command-line argument: <filename>})
(code:comment #, @t{return the argument as a filename to compile}) (code:comment @#,t{return the argument as a filename to compile})
filename)) filename))
]} ]}

View File

@ -186,11 +186,11 @@ default error display handler (see
(extract-current-continuation-marks 'key2)))) (extract-current-continuation-marks 'key2))))
(with-continuation-mark 'key 'mark1 (with-continuation-mark 'key 'mark1
(with-continuation-mark 'key 'mark2 (code:comment #, @t{replaces previous mark}) (with-continuation-mark 'key 'mark2 (code:comment @#,t{replaces previous mark})
(extract-current-continuation-marks 'key))) (extract-current-continuation-marks 'key)))
(with-continuation-mark 'key 'mark1 (with-continuation-mark 'key 'mark1
(list (code:comment #, @t{continuation extended to evaluate the argument}) (list (code:comment @#,t{continuation extended to evaluate the argument})
(with-continuation-mark 'key 'mark2 (with-continuation-mark 'key 'mark2
(extract-current-continuation-marks 'key)))) (extract-current-continuation-marks 'key))))

View File

@ -45,7 +45,7 @@ The essential reduction rules are:
@schemeblock[ @schemeblock[
(% _val proc) => _val (% _val proc) => _val
(% _E[(fcontrol _val)] _proc) => (_proc _val (lambda (_x) _E[_x])) (% _E[(fcontrol _val)] _proc) => (_proc _val (lambda (_x) _E[_x]))
(code:comment #, @t{where @scheme[_E] has no @scheme[%]}) (code:comment @#,t{where @scheme[_E] has no @scheme[%]})
] ]
When @scheme[handler-expr] is omitted, @scheme[%] is the same as When @scheme[handler-expr] is omitted, @scheme[%] is the same as
@ -66,7 +66,7 @@ The essential reduction rules are:
(prompt _val) => _val (prompt _val) => _val
(prompt _E[(control _k _expr)]) => (prompt ((lambda (_k) _expr) (prompt _E[(control _k _expr)]) => (prompt ((lambda (_k) _expr)
(lambda (_v) _E[_v]))) (lambda (_v) _E[_v])))
(code:comment #, @t{where @scheme[_E] has no @scheme[prompt]}) (code:comment @#,t{where @scheme[_E] has no @scheme[prompt]})
]} ]}
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -84,7 +84,7 @@ tags:
(prompt-at _tag _E[(control-at _tag _k _expr)]) => (prompt-at _tag (prompt-at _tag _E[(control-at _tag _k _expr)]) => (prompt-at _tag
((lambda (_k) _expr) ((lambda (_k) _expr)
(lambda (_v) _E[_v]))) (lambda (_v) _E[_v])))
(code:comment #, @t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]}) (code:comment @#,t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]})
]} ]}
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -102,7 +102,7 @@ The essential reduction rules are:
(reset _val) => _val (reset _val) => _val
(reset _E[(shift _k _expr)]) => (reset ((lambda (_k) _expr) (reset _E[(shift _k _expr)]) => (reset ((lambda (_k) _expr)
(lambda (_v) (reset _E[_v])))) (lambda (_v) (reset _E[_v]))))
(code:comment #, @t{where @scheme[_E] has no @scheme[reset]}) (code:comment @#,t{where @scheme[_E] has no @scheme[reset]})
] ]
The @scheme[reset] and @scheme[prompt] forms are interchangeable.} The @scheme[reset] and @scheme[prompt] forms are interchangeable.}
@ -182,7 +182,7 @@ The essential reduction rules are:
(spawn _proc) => (prompt _tag (_proc (lambda (_x) (abort _tag _x)))) (spawn _proc) => (prompt _tag (_proc (lambda (_x) (abort _tag _x))))
(prompt-at _tag _E[(abort _tag _proc)]) (prompt-at _tag _E[(abort _tag _proc)])
=> (_proc (lambda (_x) (prompt-at _tag _E[_x]))) => (_proc (lambda (_x) (prompt-at _tag _E[_x])))
(code:comment #, @t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]}) (code:comment @#,t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]})
]} ]}
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------
@ -202,10 +202,10 @@ The essential reduction rules are:
(lambda (_proc) (lambda (_proc)
(control0-at _tag _k (_proc _k))))) (control0-at _tag _k (_proc _k)))))
(prompt-at _tag _E[(abort _tag _thunk)]) => (_thunk) (prompt-at _tag _E[(abort _tag _thunk)]) => (_thunk)
(code:comment #, @t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]}) (code:comment @#,t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]})
(prompt-at _tag _E[(control0-at _tag _k _expr)]) => ((lambda (_k) _expr) (prompt-at _tag _E[(control0-at _tag _k _expr)]) => ((lambda (_k) _expr)
(lambda (_x) _E[_x])) (lambda (_x) _E[_x]))
(code:comment #, @t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]}) (code:comment @#,t{where @scheme[_E] has no @scheme[prompt-at] for @scheme[_tag]})
]} ]}
@; ---------------------------------------------------------------------- @; ----------------------------------------------------------------------

View File

@ -43,7 +43,7 @@ simplifies
Scheme evaluation simplifies Scheme evaluation simplifies
@schemeblock[ @schemeblock[
(+ 1 1) #, @reduces 2 (+ 1 1) @#,reduces 2
] ]
The arrow @reduces above replaces the more traditional @tt{=} to The arrow @reduces above replaces the more traditional @tt{=} to
@ -66,7 +66,7 @@ into two parts: a @deftech{redex}, which is the part that changed in a
single-step simplification (highlighted), and the single-step simplification (highlighted), and the
@deftech{continuation}, which is the surrounding expression @deftech{continuation}, which is the surrounding expression
context. In @scheme[(- 4 (+ 1 1))], the redex is @scheme[(+ 1 1)], and context. In @scheme[(- 4 (+ 1 1))], the redex is @scheme[(+ 1 1)], and
the continuation is @scheme[(- 4 #, @hole)], where @hole takes the the continuation is @scheme[(- 4 @#,hole)], where @hole takes the
place of the redex. That is, the continuation says how to ``continue'' place of the redex. That is, the continuation says how to ``continue''
after the @tech{redex} is reduced to a @tech{value}. after the @tech{redex} is reduced to a @tech{value}.
@ -97,18 +97,18 @@ substituting @scheme[_expr] in place of @hole in the @tech{continuation}
@scheme[_C]: @scheme[_C]:
@schemeblock[ @schemeblock[
#, @sub[_C (- 4 (+ 1 1))] #, @reduces #, @sub[_C (- 4 2)] @#,sub[_C (- 4 (+ 1 1))] @#,reduces @#,sub[_C (- 4 2)]
] ]
In this case, the @tech{continuation} for reducing @scheme[(+ 1 1)] is In this case, the @tech{continuation} for reducing @scheme[(+ 1 1)] is
@sub[_C (+ 4 #, @hole)], not just @scheme[_C]. @sub[_C (+ 4 @#,hole)], not just @scheme[_C].
In contrast, @scheme[(+ 1 1)] is in @tech{tail position} with respect In contrast, @scheme[(+ 1 1)] is in @tech{tail position} with respect
to @scheme[(if (zero? 0) (+ 1 1) 3)], because, for any continuation to @scheme[(if (zero? 0) (+ 1 1) 3)], because, for any continuation
@scheme[_C], @scheme[_C],
@schemeblock[ @schemeblock[
#, @sub[_C (if (zero? 0) (+ 1 1) 3)] #, @reduces #, @sub[_C (if #t (+ 1 1) 3)] #, @reduces #, @sub[_C (+ 1 1)] @#,sub[_C (if (zero? 0) (+ 1 1) 3)] @#,reduces @#,sub[_C (if #t (+ 1 1) 3)] @#,reduces @#,sub[_C (+ 1 1)]
] ]
The steps in this reduction sequence are driven by the definition of The steps in this reduction sequence are driven by the definition of
@ -131,11 +131,11 @@ same way that a procedure can accept multiple arguments.
Most @tech{continuations} expect a particular number of result Most @tech{continuations} expect a particular number of result
@tech{values}. Indeed, most @tech{continuations}, such as @scheme[(+ @tech{values}. Indeed, most @tech{continuations}, such as @scheme[(+
#, @hole 1)] expect a single @tech{value}. The @tech{continuation} @#,hole 1)] expect a single @tech{value}. The @tech{continuation}
@scheme[(let-values ([(x y) #, @hole]) _expr)] expects two result @scheme[(let-values ([(x y) @#,hole]) _expr)] expects two result
@tech{values}; the first result replaces @scheme[x] in the body @tech{values}; the first result replaces @scheme[x] in the body
@scheme[_expr], and the second replaces @scheme[y] in @scheme[_expr], and the second replaces @scheme[y] in
@scheme[_expr]. The @tech{continuation} @scheme[(begin #, @hole (+ 1 @scheme[_expr]. The @tech{continuation} @scheme[(begin @#,hole (+ 1
2))] accepts any number of result @tech{values}, because it ignores 2))] accepts any number of result @tech{values}, because it ignores
the result(s). the result(s).

View File

@ -482,26 +482,26 @@ to @scheme[(find-collects-dir)], and it is reconstructed using
Examples: Examples:
@schemeblock[ @schemeblock[
(code:comment #, @t{Access a file @filepath{data.txt} at run-time that is originally}) (code:comment @#,t{Access a file @filepath{data.txt} at run-time that is originally})
(code:comment #, @t{located in the same directory as the module source file:}) (code:comment @#,t{located in the same directory as the module source file:})
(define-runtime-path data-file "data.txt") (define-runtime-path data-file "data.txt")
(define (read-data) (define (read-data)
(with-input-from-file data-file (with-input-from-file data-file
(lambda () (lambda ()
(read-bytes (file-size data-file))))) (read-bytes (file-size data-file)))))
(code:comment #, @t{Load a platform-specific shared object (using @scheme[ffi-lib])}) (code:comment @#,t{Load a platform-specific shared object (using @scheme[ffi-lib])})
(code:comment #, @t{that is located in a platform-specific sub-directory of the}) (code:comment @#,t{that is located in a platform-specific sub-directory of the})
(code:comment #, @t{module's source directory:}) (code:comment @#,t{module's source directory:})
(define-runtime-path libfit-path (define-runtime-path libfit-path
(build-path "compiled" "native" (system-library-subpath #f) (build-path "compiled" "native" (system-library-subpath #f)
(path-replace-suffix "libfit" (path-replace-suffix "libfit"
(system-type 'so-suffix)))) (system-type 'so-suffix))))
(define libfit (ffi-lib libfit-path)) (define libfit (ffi-lib libfit-path))
(code:comment #, @t{Load a platform-specific shared object that might be installed}) (code:comment @#,t{Load a platform-specific shared object that might be installed})
(code:comment #, @t{as part of the operating system, or might be installed}) (code:comment @#,t{as part of the operating system, or might be installed})
(code:comment #, @t{specifically for PLT Scheme:}) (code:comment @#,t{specifically for PLT Scheme:})
(define-runtime-path libssl-so (define-runtime-path libssl-so
(case (system-type) (case (system-type)
[(windows) '(so "ssleay32")] [(windows) '(so "ssleay32")]

View File

@ -64,8 +64,8 @@ introduces a binding without actually executing the
documentation, but cannot or do not want to run the providing module. documentation, but cannot or do not want to run the providing module.
@schemeblock[ @schemeblock[
(require scheme/gui) (code:comment #, @t{does not work in @exec{mzscheme}}) (require scheme/gui) (code:comment @#,t{does not work in @exec{mzscheme}})
(require (for-label scheme/gui)) (code:comment #, @t{ok in @exec{mzscheme}}) (require (for-label scheme/gui)) (code:comment @#,t{ok in @exec{mzscheme}})
(help frame%) (help frame%)
] ]
@ -79,7 +79,7 @@ The @scheme[(help id #:from module-path)] variant is similar to
@scheme[for-label] in a temporary namespace.) @scheme[for-label] in a temporary namespace.)
@schemeblock[ @schemeblock[
(help frame% #:from scheme/gui) (code:comment #, @t{equivalent to the above}) (help frame% #:from scheme/gui) (code:comment @#,t{equivalent to the above})
] ]
The @scheme[(help #:search datum ...)] form is similar to The @scheme[(help #:search datum ...)] form is similar to

View File

@ -137,15 +137,15 @@ string.
For each @schemekeywordfont{log-}@scheme[_level], For each @schemekeywordfont{log-}@scheme[_level],
@schemeblock[ @schemeblock[
(#, @schemekeywordfont{log-}_level string-expr) (@#,schemekeywordfont{log-}_level string-expr)
] ]
is equivalent to is equivalent to
@schemeblock[ @schemeblock[
(let ([l (current-logger)]) (let ([l (current-logger)])
(when (log-level? l '#, @scheme[_level]) (when (log-level? l '@#,scheme[_level])
(log-message l '#, @scheme[_level] string-expr (log-message l '@#,scheme[_level] string-expr
(current-continuation-marks)))) (current-continuation-marks))))
]} ]}

View File

@ -248,16 +248,16 @@ Windows examples.
@schemeblock[ @schemeblock[
(define p1 (build-path (current-directory) "src" "scheme")) (define p1 (build-path (current-directory) "src" "scheme"))
(code:comment #, @t{Unix: @scheme[p1] is @scheme["/home/joeuser/src/scheme"]}) (code:comment @#,t{Unix: @scheme[p1] is @scheme["/home/joeuser/src/scheme"]})
(code:comment #, @t{Windows: @scheme[p1] is @scheme["C:\\Joe's Files\\src\\scheme"]}) (code:comment @#,t{Windows: @scheme[p1] is @scheme["C:\\Joe's Files\\src\\scheme"]})
(define p2 (build-path 'up 'up "docs" "Scheme")) (define p2 (build-path 'up 'up "docs" "Scheme"))
(code:comment #, @t{Unix: @scheme[p2] is @scheme["../../docs/Scheme"]}) (code:comment @#,t{Unix: @scheme[p2] is @scheme["../../docs/Scheme"]})
(code:comment #, @t{Windows: @scheme[p2] is @scheme["..\\..\\docs\\Scheme"]}) (code:comment @#,t{Windows: @scheme[p2] is @scheme["..\\..\\docs\\Scheme"]})
(build-path p2 p1) (build-path p2 p1)
(code:comment #, @t{Unix and Windows: raises @scheme[exn:fail:contract]; @scheme[p1] is absolute}) (code:comment @#,t{Unix and Windows: raises @scheme[exn:fail:contract]; @scheme[p1] is absolute})
(build-path p1 p2) (build-path p1 p2)
(code:comment #, @t{Unix: is @scheme["/home/joeuser/src/scheme/../../docs/Scheme"]}) (code:comment @#,t{Unix: is @scheme["/home/joeuser/src/scheme/../../docs/Scheme"]})
(code:comment #, @t{Windows: is @scheme["C:\\Joe's Files\\src\\scheme\\..\\..\\docs\\Scheme"]}) (code:comment @#,t{Windows: is @scheme["C:\\Joe's Files\\src\\scheme\\..\\..\\docs\\Scheme"]})
]} ]}

View File

@ -137,7 +137,7 @@ top-level namespace:
@interaction[ @interaction[
#:eval box-eval #:eval box-eval
(define base-module-eval (define base-module-eval
(code:comment #, @t{a module cannot have free variables...}) (code:comment @#,t{a module cannot have free variables...})
(make-evaluator 'scheme/base '(define (f) later))) (make-evaluator 'scheme/base '(define (f) later)))
(define base-module-eval (define base-module-eval
(make-evaluator 'scheme/base '(define (f) later) (make-evaluator 'scheme/base '(define (f) later)
@ -145,7 +145,7 @@ top-level namespace:
(base-module-eval '(f)) (base-module-eval '(f))
(define base-top-eval (define base-top-eval
(code:comment #, @t{non-module code can have free variables:}) (code:comment @#,t{non-module code can have free variables:})
(make-evaluator '(begin) '(define (f) later))) (make-evaluator '(begin) '(define (f) later)))
(base-top-eval '(+ 1 2)) (base-top-eval '(+ 1 2))
(base-top-eval '(define later 5)) (base-top-eval '(define later 5))
@ -162,7 +162,7 @@ restriction is enforced).
@schemeblock[ @schemeblock[
(define base-module-eval2 (define base-module-eval2
(code:comment #, @t{equivalent to @scheme[base-module-eval]:}) (code:comment @#,t{equivalent to @scheme[base-module-eval]:})
(make-module-evaluator '(module m scheme/base (make-module-evaluator '(module m scheme/base
(define (f) later) (define (f) later)
(define later 5)))) (define later 5))))
@ -868,7 +868,7 @@ your own permissions, for example,
(call-in-sandbox-context (call-in-sandbox-context
(lambda () (lambda ()
(parameterize ([current-security-guard guard]) (parameterize ([current-security-guard guard])
(code:comment #, @t{can access anything you want here}) (code:comment @#,t{can access anything you want here})
)))) ))))
]} ]}

View File

@ -414,9 +414,9 @@ instance of @scheme[id] and copies its field values into @scheme[x].
(define-serializable-struct/versions point 1 (x y z) (define-serializable-struct/versions point 1 (x y z)
([0 ([0
(code:comment #, @t{Constructor for simple v0 instances:}) (code:comment @#,t{Constructor for simple v0 instances:})
(lambda (x y) (make-point x y 0)) (lambda (x y) (make-point x y 0))
(code:comment #, @t{Constructor for v0 instance in a cycle:}) (code:comment @#,t{Constructor for v0 instance in a cycle:})
(lambda () (lambda ()
(let ([p0 (make-point #f #f 0)]) (let ([p0 (make-point #f #f 0)])
(values (values

View File

@ -50,7 +50,7 @@ production take precedence over later variants:
(mcons patchable-expr patchable-expr) (mcons patchable-expr patchable-expr)
(vector patchable-expr ...) (vector patchable-expr ...)
(box patchable-expr ...) (box patchable-expr ...)
(#, @|maker| patchable-expr ...)] (@#,|maker| patchable-expr ...)]
[in-immutable-expr shell-id [in-immutable-expr shell-id
shell-expr shell-expr
early-expr] early-expr]
@ -105,12 +105,12 @@ data cycles (but only with cycles that can be created via mutation).
(shared ([a (cons 1 b)] (shared ([a (cons 1 b)]
[b 7]) [b 7])
a) a)
(shared ([a a]) (code:comment #, @t{no indirection...}) (shared ([a a]) (code:comment @#,t{no indirection...})
a) a)
(shared ([a (cons 1 b)] (code:comment #, @t{@scheme[b] is early...}) (shared ([a (cons 1 b)] (code:comment @#,t{@scheme[b] is early...})
[b a]) [b a])
a) a)
(shared ([a (mcons 1 b)] (code:comment #, @t{@scheme[b] is patchable...}) (shared ([a (mcons 1 b)] (code:comment @#,t{@scheme[b] is patchable...})
[b a]) [b a])
a) a)
(shared ([a (vector b b b)] (shared ([a (vector b b b)]
@ -118,8 +118,8 @@ data cycles (but only with cycles that can be created via mutation).
(set-box! b 5) (set-box! b 5)
a) a)
(shared ([a (box b)] (shared ([a (box b)]
[b (vector (unbox a) (code:comment #, @t{@scheme[unbox] after @scheme[a] is patched}) [b (vector (unbox a) (code:comment @#,t{@scheme[unbox] after @scheme[a] is patched})
(unbox c))] (code:comment #, @t{@scheme[unbox] before @scheme[c] is patched}) (unbox c))] (code:comment @#,t{@scheme[unbox] before @scheme[c] is patched})
[c (box b)]) [c (box b)])
b) b)
]} ]}

View File

@ -133,12 +133,12 @@ flags:
@nonterm{file} : @scheme[require]s @nonterm{file}.} @nonterm{file} : @scheme[require]s @nonterm{file}.}
@item{@FlagFirst{l} @nonterm{path} or @DFlagFirst{lib} @item{@FlagFirst{l} @nonterm{path} or @DFlagFirst{lib}
@nonterm{path} : @scheme[require]s @scheme[(lib #, @nonterm{path} : @scheme[require]s @scheme[(lib
@nontermstr{path})].} @#,nontermstr{path})].}
@item{@FlagFirst{p} @nonterm{file} @nonterm{u} @nonterm{path} : @item{@FlagFirst{p} @nonterm{file} @nonterm{u} @nonterm{path} :
@scheme[require]s @scheme[(planet #, @nontermstr{file} @scheme[require]s @scheme[(planet @#,nontermstr{file}
#, @nontermstr{user} #, @nontermstr{pkg})]. @#,nontermstr{user} @#,nontermstr{pkg})].
@margin-note{Despite its name, @DFlag{script} is not usually @margin-note{Despite its name, @DFlag{script} is not usually
used for Unix scripts. See @guidesecref["scripts"] for more used for Unix scripts. See @guidesecref["scripts"] for more
@ -227,8 +227,8 @@ flags:
@scheme[textual-read-eval-print-loop] instead of @scheme[textual-read-eval-print-loop] instead of
@scheme[graphical-read-eval-print-loop].} @scheme[graphical-read-eval-print-loop].}
@item{@FlagFirst{I} @nonterm{path} : Sets @scheme[(lib #, @item{@FlagFirst{I} @nonterm{path} : Sets @scheme[(lib
@nontermstr{path})] as the path to @scheme[require] to initialize @#,nontermstr{path})] as the path to @scheme[require] to initialize
the namespace, unless namespace initialization is disabled.} the namespace, unless namespace initialization is disabled.}
@item{@FlagFirst{X} @nonterm{dir} or @DFlagFirst{collects} @item{@FlagFirst{X} @nonterm{dir} or @DFlagFirst{collects}

View File

@ -187,7 +187,7 @@ must be a list or vector of five elements:
@schemeblock[ @schemeblock[
(list source-name line column position span) (list source-name line column position span)
#, @elem{or} (vector source-name line column position span) @#,elem{or} (vector source-name line column position span)
] ]
where @scheme[source-name-v] is an arbitrary value for the source where @scheme[source-name-v] is an arbitrary value for the source

View File

@ -42,9 +42,9 @@ expression is provided to the transformer.
(let-syntax ([x (make-set!-transformer (let-syntax ([x (make-set!-transformer
(lambda (stx) (lambda (stx)
(syntax-case stx (set!) (syntax-case stx (set!)
(code:comment #, @t{Redirect mutation of x to y}) (code:comment @#,t{Redirect mutation of x to y})
[(set! id v) (syntax (set! y v))] [(set! id v) (syntax (set! y v))]
(code:comment #, @t{Normal use of @scheme[x] really gets @scheme[x]}) (code:comment @#,t{Normal use of @scheme[x] really gets @scheme[x]})
[id (identifier? (syntax id)) (syntax x)])))]) [id (identifier? (syntax id)) (syntax x)])))])
(begin (begin
(set! x 3) (set! x 3)

View File

@ -214,7 +214,7 @@ the binding (according to @scheme[free-identifier=?]) matters.}
(letrec-values (((id ...) expr) ...) (letrec-values (((id ...) expr) ...)
expr ...+) expr ...+)
(set! id expr) (set! id expr)
(#, @scheme[quote] datum) (@#,scheme[quote] datum)
(quote-syntax datum) (quote-syntax datum)
(with-continuation-mark expr expr expr) (with-continuation-mark expr expr expr)
(#%plain-app expr ...+) (#%plain-app expr ...+)
@ -777,15 +777,15 @@ and to start evaluating expanded/compiled code.
@examples[ @examples[
(code:line (code:line
(define x 'orig) (code:comment #, @t{define in the original namespace})) (define x 'orig) (code:comment @#,t{define in the original namespace}))
(code:comment #, @t{The following @scheme[let] expression is compiled in the original}) (code:comment @#,t{The following @scheme[let] expression is compiled in the original})
(code:comment #, @t{namespace, so direct references to @scheme[x] see @scheme['orig].}) (code:comment @#,t{namespace, so direct references to @scheme[x] see @scheme['orig].})
(code:line (code:line
(let ([n (make-base-namespace)]) (code:comment #, @t{make new namespace}) (let ([n (make-base-namespace)]) (code:comment @#,t{make new namespace})
(parameterize ([current-namespace n]) (parameterize ([current-namespace n])
(eval '(define x 'new)) (code:comment #, @t{evals in the new namespace}) (eval '(define x 'new)) (code:comment @#,t{evals in the new namespace})
(display x) (code:comment #, @t{displays @scheme['orig]}) (display x) (code:comment @#,t{displays @scheme['orig]})
(display (eval 'x)))) (code:comment #, @t{displays @scheme['new]})) (display (eval 'x)))) (code:comment @#,t{displays @scheme['new]}))
] ]
A @tech{namespace} is purely a top-level entity, not to be confused A @tech{namespace} is purely a top-level entity, not to be confused

View File

@ -41,7 +41,7 @@ a sequence of characters). These grammatical specifications are shown
as in the following specification of a @schemekeywordfont{something} as in the following specification of a @schemekeywordfont{something}
form: form:
@specsubform[(#, @schemekeywordfont{something} id thing-expr ...) @specsubform[(@#,schemekeywordfont{something} id thing-expr ...)
#:contracts ([thing-expr number?])] #:contracts ([thing-expr number?])]
Within such specifications, Within such specifications,
@ -77,7 +77,7 @@ Within such specifications,
]} ]}
@item{Contracts indicate constraints on sub-expression results. For @item{Contracts indicate constraints on sub-expression results. For
example, @scheme[_thing-expr #, @elem{:} number?] indicates that example, @scheme[_thing-expr @#,elem{:} number?] indicates that
the expression @scheme[_thing-expr] must produce a number.}] the expression @scheme[_thing-expr] must produce a number.}]
@;------------------------------------------------------------------------ @;------------------------------------------------------------------------
@ -611,13 +611,13 @@ corresponds to the default @tech{module name resolver}.
symbolically. symbolically.
@examples[ @examples[
(code:comment #, @t{@filepath{main.ss} in package @filepath{farm} by @filepath{mcdonald}:}) (code:comment @#,t{@filepath{main.ss} in package @filepath{farm} by @filepath{mcdonald}:})
(eval:alts (require (planet mcdonald/farm)) (void)) (eval:alts (require (planet mcdonald/farm)) (void))
(code:comment #, @t{@filepath{main.ss} in version >= 2.0 of package @filepath{farm} by @filepath{mcdonald}:}) (code:comment @#,t{@filepath{main.ss} in version >= 2.0 of package @filepath{farm} by @filepath{mcdonald}:})
(eval:alts (require (planet mcdonald/farm:2)) (void)) (eval:alts (require (planet mcdonald/farm:2)) (void))
(code:comment #, @t{@filepath{main.ss} in version >= 2.5 of package @filepath{farm} by @filepath{mcdonald}:}) (code:comment @#,t{@filepath{main.ss} in version >= 2.5 of package @filepath{farm} by @filepath{mcdonald}:})
(eval:alts (require (planet mcdonald/farm:2:5)) (void)) (eval:alts (require (planet mcdonald/farm:2:5)) (void))
(code:comment #, @t{@filepath{duck.ss} in version >= 2.5 of package @filepath{farm} by @filepath{mcdonald}:}) (code:comment @#,t{@filepath{duck.ss} in version >= 2.5 of package @filepath{farm} by @filepath{mcdonald}:})
(eval:alts (require (planet mcdonald/farm:2:5/duck)) (void)) (eval:alts (require (planet mcdonald/farm:2:5/duck)) (void))
]} ]}
@ -1135,10 +1135,10 @@ the reference evaluates to the value in the location associated with
the binding. the binding.
When the expander encounters an @scheme[id] that is not bound by a When the expander encounters an @scheme[id] that is not bound by a
module-level or local binding, it converts the expression to @scheme[(#, module-level or local binding, it converts the expression to
@schemeidfont{#%top} . id)] giving @schemeidfont{#%top} the lexical @scheme[(@#,schemeidfont{#%top} . id)] giving @schemeidfont{#%top}
context of the @scheme[id]; typically, that context refers to the lexical context of the @scheme[id]; typically, that context refers
@scheme[#%top]. See also @secref["expand-steps"]. to @scheme[#%top]. See also @secref["expand-steps"].
@examples[ @examples[
(define x 10) (define x 10)
@ -1198,10 +1198,10 @@ Applies a procedure, when @scheme[proc-expr] is not an
identifier that has a transformer binding (see identifier that has a transformer binding (see
@secref["expansion"]). @secref["expansion"]).
More precisely, the expander converts this form to @scheme[(#, More precisely, the expander converts this form to
@schemeidfont{#%app} proc-expr arg ...)], giving @schemeidfont{#%app} @scheme[(@#,schemeidfont{#%app} proc-expr arg ...)], giving
the lexical context that is associated with the original form (i.e., @schemeidfont{#%app} the lexical context that is associated with the
the pair that combines @scheme[proc-expr] and its original form (i.e., the pair that combines @scheme[proc-expr] and its
arguments). Typically, the lexical context of the pair indicates the arguments). Typically, the lexical context of the pair indicates the
procedure-application @scheme[#%app] that is described next. See also procedure-application @scheme[#%app] that is described next. See also
@secref["expand-steps"]. @secref["expand-steps"].
@ -1790,7 +1790,7 @@ A @scheme[case-clause] that starts with @scheme[else] must be the last
([head id ([head id
(head args)] (head args)]
[args (code:line arg ...) [args (code:line arg ...)
(code:line arg ... #, @schemeparenfont{.} rest-id)] (code:line arg ... @#,schemeparenfont{.} rest-id)]
[arg arg-id [arg arg-id
[arg-id default-expr] [arg-id default-expr]
(code:line keyword arg-id) (code:line keyword arg-id)
@ -1805,7 +1805,7 @@ defined as follows:
@schemeblock[ @schemeblock[
(#,cvt (id . _kw-formals) . _datum) = (lambda _kw-formals . _datum) (#,cvt (id . _kw-formals) . _datum) = (lambda _kw-formals . _datum)
(#,cvt (head . _kw-formals) . _datum) = (lambda _kw-formals expr) (#,cvt (head . _kw-formals) . _datum) = (lambda _kw-formals expr)
#, @elem{if} (#,cvt head . _datum) = expr @#,elem{if} (#,cvt head . _datum) = expr
] ]
At the top level, the top-level binding @scheme[id] is created after At the top level, the top-level binding @scheme[id] is created after

View File

@ -89,7 +89,7 @@ Whether in ``text'' mode or Scheme mode, @litchar["@"] in a document
provides an escape to Scheme mode. The syntax of @litchar["@"] is provides an escape to Scheme mode. The syntax of @litchar["@"] is
@schemeblock[ @schemeblock[
#, @BNF-seq[@litchar["@"] @#,BNF-seq[@litchar["@"]
@nonterm{cmd} @nonterm{cmd}
@litchar{[} @kleenestar{@nonterm{datum}} @litchar{]} @litchar{[} @kleenestar{@nonterm{datum}} @litchar{]}
@litchar["{"] @nonterm{text-body} @litchar["}"]] @litchar["{"] @nonterm{text-body} @litchar["}"]]
@ -114,14 +114,14 @@ A @nonterm{cmd} or @nonterm{datum} is a Scheme datum, while a
The expansion of @litchar["@"]@nonterm{cmd} into Scheme code is The expansion of @litchar["@"]@nonterm{cmd} into Scheme code is
@schemeblock[ @schemeblock[
#, @nonterm{cmd} @#,nonterm{cmd}
] ]
When either @litchar{[} @litchar{]} or @litchar["{"] @litchar["}"] When either @litchar{[} @litchar{]} or @litchar["{"] @litchar["}"]
are used, the expansion is are used, the expansion is
@schemeblock[ @schemeblock[
(#, @nonterm{cmd} #, @kleenestar{@nonterm{datum}} #, @kleenestar{@nonterm{parsed-body}}) (@#,nonterm{cmd} @#,kleenestar{@nonterm{datum}} @#,kleenestar{@nonterm{parsed-body}})
] ]
where @kleenestar{@nonterm{parsed-body}} is the parse result of the where @kleenestar{@nonterm{parsed-body}} is the parse result of the

View File

@ -92,8 +92,11 @@ A few other escapes are recognized symbolically:
produces a paragraph using @scheme[t]: produces a paragraph using @scheme[t]:
@verbatim[#:indent 2]|{ @verbatim[#:indent 2]|{
(code:comment #, @t{this is a comment}) (code:comment @#,t{this is a comment})
}|} }|
(Note that @litchar|{@#,foo{...}}| reads as @scheme[(unsyntax (foo "..."))].)
}
@item{@schemeidfont{code:blank} typesets as a blank space.} @item{@schemeidfont{code:blank} typesets as a blank space.}
@ -366,8 +369,8 @@ sub-sections.}
(keyword arg-id contract-expr-datum default-expr) (keyword arg-id contract-expr-datum default-expr)
ellipses ellipses
ellipses+] ellipses+]
[ellipses #, @lit-ellipses] [ellipses @#,lit-ellipses]
[ellipses+ #, @lit-ellipses+])]{ [ellipses+ @#,lit-ellipses+])]{
Produces a sequence of flow elements (encapsulated in a Produces a sequence of flow elements (encapsulated in a
@scheme[splice]) to document a procedure named @scheme[id]. Nesting @scheme[splice]) to document a procedure named @scheme[id]. Nesting
@ -402,13 +405,13 @@ Each @scheme[arg-spec] must have one of the following forms:
Like the previous case, but with a default Like the previous case, but with a default
value.} value.}
@specsubform[#, @lit-ellipses]{Any number of the preceding argument. This @specsubform[@#,lit-ellipses]{Any number of the preceding argument. This
form is normally used at the end, but keyword-based arguments form is normally used at the end, but keyword-based arguments
can sensibly appear afterward. See also the documentation for can sensibly appear afterward. See also the documentation for
@scheme[append] for a use of @lit-ellipses before the last @scheme[append] for a use of @lit-ellipses before the last
argument.} argument.}
@specsubform[#, @lit-ellipses+]{One or more of the preceding argument @specsubform[@#,lit-ellipses+]{One or more of the preceding argument
(normally at the end, like @lit-ellipses).} (normally at the end, like @lit-ellipses).}
The @scheme[result-contract-expr-datum] is typeset via The @scheme[result-contract-expr-datum] is typeset via

View File

@ -19,7 +19,7 @@ the least-used characters in Scheme code.
You can use the reader via Scheme's @schemefont{#reader} form: You can use the reader via Scheme's @schemefont{#reader} form:
@schemeblock[ @schemeblock[
#, @schemefont|{ @#,schemefont|{
#reader scribble/reader @foo{This is free-form text!} #reader scribble/reader @foo{This is free-form text!}
}|] }|]
@ -60,7 +60,7 @@ function to switch the current readtable to a readtable that parses
Informally, the concrete syntax of @"@"-forms is Informally, the concrete syntax of @"@"-forms is
@schemeblock[ @schemeblock[
#, @BNF-seq[@litchar["@"] @#,BNF-seq[@litchar["@"]
@nonterm{cmd} @nonterm{cmd}
@litchar{[} @kleenestar{@nonterm{datum}} @litchar{]} @litchar{[} @kleenestar{@nonterm{datum}} @litchar{]}
@litchar["{"] @kleenestar{@nonterm{text-body}} @litchar["}"]] @litchar["{"] @kleenestar{@nonterm{text-body}} @litchar["}"]]
@ -71,7 +71,7 @@ one should be present. (Note that spaces are not allowed between the
three parts.) Roughly, a form matching the above grammar is read as three parts.) Roughly, a form matching the above grammar is read as
@schemeblock[ @schemeblock[
(#, @nonterm{cmd} #, @kleenestar{@nonterm{datum}} #, @kleenestar{@nonterm{parsed-body}}) (@#,nonterm{cmd} @#,kleenestar{@nonterm{datum}} @#,kleenestar{@nonterm{parsed-body}})
] ]
where @nonterm{parsed-body} is the translation of each where @nonterm{parsed-body} is the translation of each
@ -289,9 +289,9 @@ comment. There are two comment forms, one for arbitrary-text and
possibly nested comments, and another one for line comments: possibly nested comments, and another one for line comments:
@schemeblock[ @schemeblock[
#, @BNF-seq[@litchar["@;{"] @kleenestar{@nonterm{any}} @litchar["}"]] @#,BNF-seq[@litchar["@;{"] @kleenestar{@nonterm{any}} @litchar["}"]]
#, @BNF-seq[@litchar["@;"] @kleenestar{@nonterm{anything-else-without-newline}}] @#,BNF-seq[@litchar["@;"] @kleenestar{@nonterm{anything-else-without-newline}}]
] ]
In the first form, the commented body must still parse correctly; see In the first form, the commented body must still parse correctly; see
@ -620,12 +620,12 @@ can be used to identify newlines in the original @nonterm{text-body}.
@; FIXME: unfortunate code duplication (again): @; FIXME: unfortunate code duplication (again):
@interaction[ @interaction[
(eval:alts (eval:alts
(let ([nl (car #, @tt["@'{"] (let ([nl (car @#,tt["@'{"]
#, @tt[" }"])]) @#,tt[" }"])])
(for-each (lambda (x) (display (if (eq? x nl) "\n... " x))) (for-each (lambda (x) (display (if (eq? x nl) "\n... " x)))
#, @tt["@`{foo"] @#,tt["@`{foo"]
#, @elem[@tt[" @"] @scheme[,@(list "bar" "\n" "baz")]] @#,elem[@tt[" @"] @scheme[,@(list "bar" "\n" "baz")]]
#, @tt[" blah}}"]) @#,tt[" blah}}"])
(newline)) (newline))
(let ([nl (car @'{ (let ([nl (car @'{
})]) })])
@ -785,7 +785,7 @@ example, implicitly quoted keywords:
(cddr xs))))]))) (cddr xs))))])))
(eval:alts (eval:alts
(code:line (code:line
#, @tt["@foo[x 1 y (* 2 3)]{blah}"]) @#,tt["@foo[x 1 y (* 2 3)]{blah}"])
;; Unfortunately, expressions are preserved by `def+int' ;; Unfortunately, expressions are preserved by `def+int'
;; using `quote', not `quote-syntax' (which would create all sorts ;; using `quote', not `quote-syntax' (which would create all sorts
;; or binding trouble), so we manually re-attach the property: ;; or binding trouble), so we manually re-attach the property:
@ -827,10 +827,10 @@ is an example of this.
rst)])))))])) rst)])))))]))
(eval:alts (eval:alts
(code:line (code:line
#, @tt["@verb[string-append]{"] @#,tt["@verb[string-append]{"]
#, @tt[" foo"] @#,tt[" foo"]
#, @tt[" bar"] @#,tt[" bar"]
#, @tt["}"]) @#,tt["}"])
@verb[string-append]{ @verb[string-append]{
foo foo
bar bar
@ -845,13 +845,13 @@ is an example of this.
another language that is specified immediate after another language that is specified immediate after
@schememodname[at-exp].} @schememodname[at-exp].}
For example, @scheme[#, @hash-lang[] at-exp scheme/base] adds @"@"-reader For example, @scheme[@#,hash-lang[] at-exp scheme/base] adds @"@"-reader
support to @scheme[scheme/base], so that support to @scheme[scheme/base], so that
@schememod[ @schememod[
at-exp scheme/base at-exp scheme/base
(define (greet who) #, @elem{@tt["@"]@scheme[string-append]@schemeparenfont["{"]@schemevalfont{Hello, }@tt["@|"]@scheme[who]@tt["|"]@schemevalfont{.}@schemeparenfont["}"]}) (define (greet who) @#,elem{@tt["@"]@scheme[string-append]@schemeparenfont["{"]@schemevalfont{Hello, }@tt["@|"]@scheme[who]@tt["|"]@schemevalfont{.}@schemeparenfont["}"]})
(greet "friend")] (greet "friend")]
reports @scheme["Hello, friend."]. reports @scheme["Hello, friend."].

View File

@ -138,14 +138,14 @@ returns the corresponding init arg.
This mixin uses a struct definition for its settings: This mixin uses a struct definition for its settings:
@schemeblock[ @schemeblock[
(define-struct drscheme:language:simple-settings (define-struct drscheme:language:simple-settings
(case-sensitive (code:comment #, @t{boolean?}) (case-sensitive (code:comment @#,t{boolean?})
printing-style (code:comment #, @t{(symbols 'constructor 'quasiquote 'write 'print)}) printing-style (code:comment @#,t{(symbols 'constructor 'quasiquote 'write 'print)})
fraction-style (code:comment #, @t{(symbols 'mixed-fraction 'mixed-fraction-e}) fraction-style (code:comment @#,t{(symbols 'mixed-fraction 'mixed-fraction-e})
(code:comment #, @t{ 'repeating-decimal 'repeating-decimal-e)}) (code:comment @#,t{ 'repeating-decimal 'repeating-decimal-e)})
show-sharing (code:comment #, @t{boolean?}) show-sharing (code:comment @#,t{boolean?})
insert-newlines (code:comment #, @t{boolean?}) insert-newlines (code:comment @#,t{boolean?})
annotations)) (code:comment #, @t{(symbols 'none 'debug 'debug/profile}) annotations)) (code:comment @#,t{(symbols 'none 'debug 'debug/profile})
(code:comment #, @t{ 'test-coverage)}) (code:comment @#,t{ 'test-coverage)})
] ]
The settings in this structure reflect the settings show in The settings in this structure reflect the settings show in

View File

@ -62,7 +62,7 @@ which can be implemented as libraries. To import the bindings of SRFI
@math{n}, use @math{n}, use
@schemeblock[ @schemeblock[
(require #, @elem{@schemeidfont{srfi/}@math{n}}) (require @#,elem{@schemeidfont{srfi/}@math{n}})
] ]
This document lists the SRFIs that are supported by PLT Scheme and This document lists the SRFIs that are supported by PLT Scheme and

View File

@ -92,7 +92,7 @@ The following functions allow programs to react to events from the canvas.
@defproc[(on-key-event [change (-> (unsyntax @tech{DrawKeyEvent}) (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) @defproc[(on-key-event [change (-> (unsyntax @tech{DrawKeyEvent}) (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))])
true]{Adds @scheme[change] to the world. The function reacts to keyboard true]{Adds @scheme[change] to the world. The function reacts to keyboard
events and creates a new @scheme[#, @tech{DrawWorld}].} events and creates a new @scheme[@#,tech{DrawWorld}].}
@defproc[(on-tick-event [tock (-> (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) true]{Adds @scheme[tock] @defproc[(on-tick-event [tock (-> (unsyntax @tech{DrawWorld}) (unsyntax @tech{DrawWorld}))]) true]{Adds @scheme[tock]
to the world. The function reacts to clock tick events, creating a new to the world. The function reacts to clock tick events, creating a new

View File

@ -233,7 +233,7 @@ and converts a list of colors into an image.
#reader scribble/comment-reader #reader scribble/comment-reader
(schemeblock (schemeblock
;; -- @scheme[empty] ;; -- @scheme[empty]
;; -- @scheme[(cons #, @tech{Color} List-of-color)] ;; -- @scheme[(cons @#,tech{Color} List-of-color)]
;; Interpretation: represents a list of colors. ;; Interpretation: represents a list of colors.
)) ))