From 0e1a380f49ce9d1f53cd4f2c309034c67b718e9d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 18 Aug 2013 18:12:15 -0500 Subject: [PATCH] attempt to clarify the eof insertion that drracket's repl does also fix some interactions that were using old-style printing (but in #lang racket, which doesn't print that way) --- .../drracket/interface-essentials.scrbl | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/drracket-pkgs/drracket/scribblings/drracket/interface-essentials.scrbl b/pkgs/drracket-pkgs/drracket/scribblings/drracket/interface-essentials.scrbl index 0411634a93..817b24175e 100644 --- a/pkgs/drracket-pkgs/drracket/scribblings/drracket/interface-essentials.scrbl +++ b/pkgs/drracket-pkgs/drracket/scribblings/drracket/interface-essentials.scrbl @@ -453,7 +453,7 @@ window ultimately appears as follows: @racketblock[ @#,ioinputfont{(1 2)} @#,iooutputfont{(1 2)} -@#,racketresult[(1 2)] +@#,racketresult['(1 2)] @#,tt{>} @#,tt{_} ] @@ -472,7 +472,7 @@ produces a different-looking result: @#,tt{>} (display v) @#,iooutputfont{(1 2)} @#,tt{>} v -@#,racketresult[(1 2)] +@#,racketresult['(1 2)] @#,tt{>} @#,tt{_} ] @@ -498,13 +498,28 @@ inserts a newline character into the input stream: @racketblock[ @#,tt{>} (read) @#,ioinputfont{5} - @#,racketresult[5] @#,tt{>} (read-char) @#,racketresult[#\newline] @#,tt{>} @#,tt{_} ] +The @onscreen{eof} button that appears beside an input box inserts +a single @racket[eof-object] into the input stream, but more IO may +follow in a later sequence. For example, in the following interaction, +the user typed @litchar{1} and then clicked the @onscreen{eof} button: + +@racketblock[ +@#,tt{>} (read-char) +@#,ioinputfont{1}@#,racketresult[#\1] +@#,tt{>} (read-char) +@#,racketresultfont{#} +] + +At this point, however, future interactions can still take place: +new calls to input functions with open a new input box and new +characters will come from the same port. + Within a @racket[@#,hash-lang[] @#,racketmodname[racket]] module, the results of top-level expression print the same as the results of an expression entered in the @tech{interactions window}. The reason is