/usr/share/doc/racket/scribble/eval.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4.5 Evaluation and Examples</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Scribble:<span class="mywbr"> </span> The Racket Documentation Tool</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="getting-started.html" class="tocviewlink" data-pltdoc="x">Getting Started</a></td></tr><tr><td align="right">2 </td><td><a href="reader.html" class="tocviewlink" data-pltdoc="x">@ Syntax</a></td></tr><tr><td align="right">3 </td><td><a href="generic-prose.html" class="tocviewlink" data-pltdoc="x">High-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">4 </td><td><a href="plt-manuals.html" class="tocviewselflink" data-pltdoc="x">Scribbling Documentation</a></td></tr><tr><td align="right">5 </td><td><a href="lp.html" class="tocviewlink" data-pltdoc="x">Literate Programming</a></td></tr><tr><td align="right">6 </td><td><a href="internals.html" class="tocviewlink" data-pltdoc="x">Low-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">7 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running <span class="stt">scribble</span></a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>4 </td><td><a href="plt-manuals.html" class="tocviewlink" data-pltdoc="x">Scribbling Documentation</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1 </td><td><a href="how-to-doc.html" class="tocviewlink" data-pltdoc="x">Getting Started with Documentation</a></td></tr><tr><td align="right">4.2 </td><td><a href="reference-style.html" class="tocviewlink" data-pltdoc="x">Style Guide</a></td></tr><tr><td align="right">4.3 </td><td><a href="manual.html" class="tocviewlink" data-pltdoc="x">Manual Forms</a></td></tr><tr><td align="right">4.4 </td><td><a href="scheme.html" class="tocviewlink" data-pltdoc="x">Racket</a></td></tr><tr><td align="right">4.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Evaluation and Examples</a></td></tr><tr><td align="right">4.6 </td><td><a href="srcdoc.html" class="tocviewlink" data-pltdoc="x">In-<wbr></wbr>Source Documentation</a></td></tr><tr><td align="right">4.7 </td><td><a href="bnf.html" class="tocviewlink" data-pltdoc="x">BNF Grammars</a></td></tr><tr><td align="right">4.8 </td><td><a href="Compatibility_Libraries.html" class="tocviewlink" data-pltdoc="x">Compatibility Libraries</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>4.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Evaluation and Examples</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.5.1 </td><td><a href="#%28part._old-eval%29" class="tocviewlink" data-pltdoc="x">Legacy Evaluation</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">examples</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>base-<wbr></wbr>eval</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval-factory%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>base-<wbr></wbr>eval-<wbr></wbr>factory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-eval-factory%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>eval-<wbr></wbr>factory</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-log-based-eval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>log-<wbr></wbr>based-<wbr></wbr>eval</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._close-eval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">close-<wbr></wbr>eval</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-eval-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">scribble-<wbr></wbr>eval-<wbr></wbr>handler</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-exn-~3estring%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">scribble-<wbr></wbr>exn-<wbr></wbr>>string</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.5.1<tt> </tt></span><a href="#%28part._old-eval%29" class="tocsubseclink" data-pltdoc="x">Legacy Evaluation</a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">interaction</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction0%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">interaction0</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%2Fno-prompt%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">interaction/<span class="mywbr"> </span>no-<wbr></wbr>prompt</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">interaction-<wbr></wbr>eval</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval-show%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">interaction-<wbr></wbr>eval-<wbr></wbr>show</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketblock%2Beval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">racketblock+<span class="mywbr"> </span>eval</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketblock0%2Beval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">racketblock0+<span class="mywbr"> </span>eval</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketmod%2Beval%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">racketmod+<span class="mywbr"> </span>eval</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._def%2Bint%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">def+<span class="mywbr"> </span>int</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defs%2Bint%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">defs+<span class="mywbr"> </span>int</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">examples</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">examples*</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defexamples%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">defexamples</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defexamples%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">defexamples*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._as-examples%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">as-<wbr></wbr>examples</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._with-eval-preserve-source-locations%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">with-<wbr></wbr>eval-<wbr></wbr>preserve-<wbr></wbr>source-<wbr></wbr>locations</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="scheme.html" title="backward to "4.4 Racket"" data-pltdoc="x">← prev</a> <a href="plt-manuals.html" title="up to "4 Scribbling Documentation"" data-pltdoc="x">up</a> <a href="srcdoc.html" title="forward to "4.6 In-Source Documentation"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-source-pkg="scribble-doc" x-part-tag=""eval"">4.5<tt> </tt><a name="(part._eval)"></a><a name="(mod-path._scribble/example)"></a>Evaluation and Examples</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">scribble-lib</span></span></td></tr></table></div><div class="SIntrapara">The
<span class="RktSym">scribble/example</span> library provides
utilities for evaluating code at document-build time and incorporating
the results in the document, especially to show example uses of
defined procedures and syntax.</div></p><p class="SHistory">Added in version 1.16 of package <span class="stt">scribble-lib</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/example..rkt)._examples))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">examples</a></span></span><span class="hspace"> </span><span class="RktVar">option</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">option</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:eval</span><span class="hspace"> </span><span class="RktVar">eval-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:once</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:escape</span><span class="hspace"> </span><span class="RktVar">escape-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:label</span><span class="hspace"> </span><span class="RktVar">label-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:hidden</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:result-only</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:no-inset</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:no-prompt</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:preserve-source-locations</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:no-result</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:lang</span><span class="hspace"> </span><span class="RktVar">language-name</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Similar to <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketinput%29%29" class="RktStxLink" data-pltdoc="x">racketinput</a></span>, except that the result for each input
<span class="RktVar">datum</span> is shown on the next line. The result is determined by
evaluating the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">quote</a></span>d form of the <span class="RktVar">datum</span> using the
evaluator produced by <span class="RktVar">eval-expr</span>.</div></p><p>Each keyword option can be provided at most once:</p><ul><li><p><span class="RktPn">#:eval</span><span class="stt"> </span><span class="RktVar">eval-expr</span> —<wbr></wbr> Specifies an evaluator, where
<span class="RktVar">eval-expr</span> must produce either <span class="RktVal">#f</span> or a sandbox
evaluator via <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._make-evaluator%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-evaluator</a></span> or
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._make-module-evaluator%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-module-evaluator</a></span> with the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._sandbox-output%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sandbox-output</a></span>
and <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._sandbox-error-output%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sandbox-error-output</a></span> parameters set to
<span class="RktVal">'</span><span class="RktVal">string</span>. If <span class="RktVar">eval-expr</span> is not provided or is
<span class="RktVal">#f</span>, an evaluator is created using
<span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span>. See also <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-eval-factory%29%29" class="RktValLink" data-pltdoc="x">make-eval-factory</a></span>.</p></li><li><p><span class="RktPn">#:once</span> —<wbr></wbr> Specifies that the evaluator should be
closed with <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._close-eval%29%29" class="RktValLink" data-pltdoc="x">close-eval</a></span> after the all <span class="RktVar">datum</span>s
are evaluated. The <span class="RktPn">#:once</span> option is assumed if
<span class="RktPn">#:eval</span> is not specified.</p></li><li><p><span class="RktPn">#:escape</span><span class="stt"> </span><span class="RktVar">escape-id</span> —<wbr></wbr> Specifies an escape
identifier, as in <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketblock%29%29" class="RktStxLink" data-pltdoc="x">racketblock</a></span>.</p></li><li><p><span class="RktPn">#:label</span><span class="stt"> </span><span class="RktVar">label-expr</span> —<wbr></wbr> Specifies a label for the
examples, which defaults to “Example:” or “Examples:”
(depending on the number of <span class="RktVar">datum</span>s). A <span class="RktVal">#f</span>
value for <span class="RktVar">label-expr</span> suppresses the label.</p></li><li><p><span class="RktPn">#:hidden</span> —<wbr></wbr> Specifies that the <span class="RktVar">datum</span>s and
results should not be typeset, but instead evaluated for a
side-effect, and disables <span class="RktSym">eval:error</span>. Typically, this
option is combined with <span class="RktPn">#:eval</span> to configure an
evaluator.</p></li><li><p><span class="RktPn">#:result-only</span> —<wbr></wbr> Specifies that the <span class="RktVar">datum</span>
results should be typeset, but not the <span class="RktVar">datum</span>s
themselves, and implies <span class="RktPn">#:label</span><span class="stt"> </span><span class="RktVal">#f</span>.</p></li><li><p><span class="RktPn">#:no-result</span> —<wbr></wbr> Implies <span class="RktPn">#:no-prompt</span> and
<span class="RktPn">#:label</span><span class="stt"> </span><span class="RktVal">#f</span>, specifies that no results should be
typeset, and disables <span class="RktSym">eval:error</span>.</p></li><li><p><span class="RktPn">#:no-inset</span> —<wbr></wbr> Specifies that the examples should be
typeset without indentation, i.e., like <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketinput0%29%29" class="RktStxLink" data-pltdoc="x">racketinput0</a></span>
instead of <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketinput%29%29" class="RktStxLink" data-pltdoc="x">racketinput</a></span>.</p></li><li><p><span class="RktPn">#:no-prompt</span> —<wbr></wbr> Specifies that each examples should
be typeset without a leading prompt, i.e., like
<span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketblock%29%29" class="RktStxLink" data-pltdoc="x">racketblock</a></span> instead of <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketinput%29%29" class="RktStxLink" data-pltdoc="x">racketinput</a></span>. A prompt
can be omitted from a specific <span class="RktVar">datum</span> by wrapping it
with <span class="RktSym">eval:no-prompt</span>.</p></li><li><p><span class="RktPn">#:preserve-source-locations</span> —<wbr></wbr> Specifies that the
original source locations for each <span class="RktVar">datum</span> should be
preserved for evaluation. Preserving source locations can be
useful for documenting forms that depend on source locations,
such as Redex’s typesetting macros.</p></li><li><p><span class="RktPn">#:lang</span> —<wbr></wbr> Implies <span class="RktPn">#:no-result</span> prefixes the
typeset <span class="RktVar">datum</span> sequence with a <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> line using
<span class="RktVar">language-name</span> as the module’s language.</p></li></ul><p>Certain patterns in <span class="RktVar">datum</span> are treated specially:</p><ul><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._7._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">code:line</span><span class="stt"> </span><span class="RktVar">code-datum</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym">code:comment</span><span class="stt"> </span><span class="RktVar">comment-datum</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span>
is treated as <span class="RktVar">code-datum</span> for evaluation.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._8._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">code:line</span><span class="stt"> </span><span class="RktVar">code-datum</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>
evaluates each <span class="RktVar">code-datum</span>, but only the last result is used.</p></li><li><p>Other uses of <span class="RktSym">code:comment</span>, <span class="RktSym">code:contract</span>, and
<span class="RktSym">code:blank</span> are stripped from each <span class="RktVar">datum</span>
before evaluation.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._9._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:error</span><span class="stt"> </span><span class="RktVar">eval-datum</span><span class="RktPn">)</span> is
treated like <span class="RktVar">eval-datum</span>, but <span class="RktVar">eval-datum</span> is
expected to raise an exception, and an error is shown as the
evaluation’s result.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._10._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:alts</span><span class="stt"> </span><span class="RktVar">show-datum</span><span class="stt"> </span><span class="RktVar">eval-datum</span><span class="RktPn">)</span>
is treated as <span class="RktVar">show-datum</span> for typesetting and <span class="RktVar">eval-datum</span> for evaluation.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._11._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:check</span><span class="stt"> </span><span class="RktVar">eval-datum</span><span class="stt"> </span><span class="RktVar">expect-datum</span><span class="RktPn">)</span>
is treated like <span class="RktVar">eval-datum</span>, but <span class="RktVar">check-datum</span> is also
evaluated, and an error is raised if they are not <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span>.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._12._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:result</span><span class="stt"> </span><span class="RktVar">content-expr</span><span class="stt"> </span><span class="RktVar">out-expr</span><span class="stt"> </span><span class="RktVar">err-expr</span><span class="RktPn">)</span>
involves no sandboxed evaluation; instead, the <a href="core.html#%28tech._content%29" class="techoutside" data-pltdoc="x"><span class="techinside">content</span></a> result of <span class="RktVar">content-expr</span> is used as the
typeset form of the result, <span class="RktVar">out-expr</span> is treated as output printed
by the expression, and <span class="RktVar">err-expr</span> is error output printed by the
expression. The <span class="RktVar">out-expr</span> and/or <span class="RktVar">err-expr</span> can be omitted,
in which case they default to empty strings.</p><p>Normally, <span class="RktSym">eval:result</span>
is used in the second part of an <span class="RktSym">eval:alts</span> combination. Otherwise,
<span class="RktVar">content-expr</span> is typeset as the input form (which rarely makes sense for
a reader of the example).</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._13._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:results</span><span class="stt"> </span><span class="RktVar">content-list-expr</span><span class="stt"> </span><span class="RktVar">out-expr</span><span class="stt"> </span><span class="RktVar">err-expr</span><span class="RktPn">)</span>
is treated like an <span class="RktSym">eval:result</span> form, except that <span class="RktVar">content-list-expr</span>
should produce a list of <a href="core.html#%28tech._content%29" class="techoutside" data-pltdoc="x"><span class="techinside">content</span></a> for multiple results of evaluation. As
with <span class="RktSym">eval:result</span>, <span class="RktVar">out-expr</span> and <span class="RktVar">err-expr</span> are optional.</p></li><li><p>A <span class="RktVar">datum</span> of the form
<span class="RktPn">(</span><a name="(idx._(gentag._14._(lib._scribblings/scribble/scribble..scrbl)))"></a><span class="RktSym">eval:no-prompt</span><span class="stt"> </span><span class="RktVar">eval-datum</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>
is treated like <span class="RktPn">(</span><span class="RktSym">code:line</span><span class="stt"> </span><span class="RktVar">eval-datum</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>, but no prompt is shown before
the group, and a blank line is added before and after
<span class="RktVar">eval-datum</span> and its result.</p></li></ul><p>A <span class="RktVar">datum</span> cannot be a keyword. To specify a <span class="RktVar">datum</span> that
is a keyword, wrap it with <span class="RktSym">code:line</span>.</p><p>When evaluating a <span class="RktVar">datum</span> produces an error (and <span class="RktVar">datum</span>
does not have an <span class="RktSym">eval:error</span> wrapper), an exception is raised
by <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span>.</p><p>If the value of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-print%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">current-print</a></span> in the sandbox is changed from
its default value, or if <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._print-as-expression%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">print-as-expression</a></span> in the sandbox
is set to <span class="RktVal">#f</span>, then each evaluation result is formatted to a
port by applying <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-print%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">current-print</a></span><span class="RktPn">)</span> to the value; the output
port is set to a pipe that supports specials in the sense of
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Byte_and_String_Output.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._write-special%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">write-special</a></span>, and non-character values written to the port
are used as <a href="core.html#%28tech._content%29" class="techoutside" data-pltdoc="x"><span class="techinside">content</span></a>. Otherwise, when the default
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=eval.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-print%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">current-print</a></span> is in place, result values are typeset using
<span class="RktSym"><a href="scheme.html#%28def._%28%28lib._scribble%2Fracket..rkt%29._to-element%2Fno-color%29%29" class="RktValLink" data-pltdoc="x">to-element/no-color</a></span>.</p><p>As an example,</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><a href="manual.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/manual</span></a><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">@</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">racket/sandbox</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">scribble/eval</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">@</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">my-evaluator</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=parameters.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fmore-scheme..rkt%2529._parameterize%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">parameterize</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._sandbox-output%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sandbox-output</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">'</a></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string</a></span><span class="RktPn">]</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._sandbox-error-output%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">sandbox-error-output</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">'</a></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string</a></span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._make-evaluator%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-evaluator</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">'</a></span><span class="RktSym">typed/racket/base</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktMeta"> </span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">@</span><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span><span class="RktPn">[</span><span class="RktPn">#:eval</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">my-evaluator</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">:</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">my-sqr</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">Real</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">Real</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">my-sqr</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">my-sqr</span><span class="RktMeta"></span><span class="hspace"> </span><span class="RktMeta"></span><span class="RktVal">42</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktMeta"></span></td></tr></table></blockquote><p>uses an evaluator whose language is <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=ts-reference&rel=index.html&version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">typed/racket/base</span></a>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._make-base-eval))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-base-eval</a></span></span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:pretty-print?</span><span class="hspace"> </span><span class="RktVar">pretty-print?</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:lang</span><span class="hspace"> </span><span class="RktVar">lang</span>]</td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">input-program</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pretty-print?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">lang</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">special</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">begin</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">begin</span><span class="RktVal">)</span></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">input-program</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an evaluator using <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Sandboxed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fsandbox..rkt%2529._make-evaluator%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">make-evaluator</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">racket/base</span><span class="stt"> </span><span class="RktPn">#:lang</span><span class="stt"> </span><span class="RktVar">lang</span><span class="stt"> </span><span class="RktVar">input-program</span><span class="stt"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>,
setting sandbox parameters to disable limits, setting the outputs to
<span class="RktVal">'</span><span class="RktVal">string</span>, and not adding extra security guards.</div></p><p>If <span class="RktVar">pretty-print?</span> is true, the sandbox’s printer is set to
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pretty-print.html%23%2528def._%2528%2528lib._racket%252Fpretty..rkt%2529._pretty-print-handler%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">pretty-print-handler</a></span>. In that case, values that are convertible
in the sense of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=file&rel=convertible.html%23%2528def._%2528%2528lib._file%252Fconvertible..rkt%2529._convertible%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">convertible?</a></span> are printed using <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Byte_and_String_Output.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._write-special%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">write-special</a></span>,
except that values that are serializable in the sense of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=serialization.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fserialize..rkt%2529._serializable%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">serializable?</a></span>
are serialized for tranfers from inside the sandbox to outside (which can avoid
pulling code and support from the sandboxed environment into the document-rendering
environment).</p><p class="SHistory">Changed in version 1.6 of package <span class="stt">scribble-lib</span>: Changed treatment of convertible values that are
serializable.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._make-base-eval-factory))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval-factory%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-base-eval-factory</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">mod-paths</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:pretty-print?</span><span class="hspace"> </span><span class="RktVar">pretty-print?</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:lang</span><span class="hspace"> </span><span class="RktVar">lang</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mod-paths</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pretty-print?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">lang</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">special</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">begin</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">begin</span><span class="RktVal">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Produces a function that is like <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span>, except that
each module in <span class="RktVar">mod-paths</span> is attached to the evaluator’s
namespace. The modules are loaded and instantiated once (when the
returned <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span>-like function is called the first
time) and then attached to each evaluator that is created.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._make-eval-factory))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-eval-factory%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-eval-factory</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">mod-paths</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:pretty-print?</span><span class="hspace"> </span><span class="RktVar">pretty-print?</span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">#:lang</span><span class="hspace"> </span><span class="RktVar">lang</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mod-paths</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pretty-print?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">lang</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Module_Names_and_Loading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._module-path%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">module-path?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._list%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">special</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._cons%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">begin</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td><td valign="top"><span class="hspace"> </span></td><td valign="top">=</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">begin</span><span class="RktVal">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval-factory%29%29" class="RktValLink" data-pltdoc="x">make-base-eval-factory</a></span>, but each module in <span class="RktVar">mod-paths</span> is
also required into the top-level environment for each generated evaluator.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._make-log-based-eval))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-log-based-eval%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-log-based-eval</a></span></span><span class="hspace"> </span><span class="RktVar">log-file</span><span class="hspace"> </span><span class="RktVar">mode</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">log-file</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Manipulating_Paths.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmisc..rkt%2529._path-string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">path-string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">mode</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">record</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">replay</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates an evaluator (like <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span>) that uses a log
file to either record or replay evaluations.</div></p><p>If <span class="RktVar">mode</span> is <span class="RktVal">'</span><span class="RktVal">record</span>, the evaluator records every
interaction to <span class="RktVar">log-file</span>, replacing <span class="RktVar">log-file</span> if it
already exists. The result of each interaction must be
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=serialization.html&version=6.7" class="Sq" data-pltdoc="x">serializable</a>.</p><p>If <span class="RktVar">mode</span> is <span class="RktVal">'</span><span class="RktVal">replay</span>, the evaluator uses the contents
of <span class="RktVar">log-file</span> instead of actually performing evaluatings. For
each interaction, it compares the term to evaluate against the next
interaction recorded in <span class="RktVar">log-file</span>. If the term matches, the
stored result is returned; if not, the evaluator raises an error
indicating that it is out of sync with <span class="RktVar">log-file</span>.</p><p>Use <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-log-based-eval%29%29" class="RktValLink" data-pltdoc="x">make-log-based-eval</a></span> to document libraries when the
embedded examples rely on external features that may not be present or
appropriately configured on all machines.</p><p class="SHistory">Added in version 1.12 of package <span class="stt">scribble-lib</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._close-eval))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._close-eval%29%29" class="RktValDef RktValLink" data-pltdoc="x">close-eval</a></span></span><span class="hspace"> </span><span class="RktVar">eval</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._one-of%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">one-of/c</a></span><span class="hspace"> </span><span class="RktVal">""</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">eval</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Shuts down an evaluator produced by <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span>. Use
<span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._close-eval%29%29" class="RktValLink" data-pltdoc="x">close-eval</a></span> when garbage collection cannot otherwise reclaim
an evaluator (e.g., because it is defined in a module body).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._scribble-eval-handler))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-eval-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">scribble-eval-handler</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-eval-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">scribble-eval-handler</a></span></span><span class="hspace"> </span><span class="RktVar">handler</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">handler</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter that serves as a hook for evaluation. The evaluator to use
is supplied as the first argument to the parameter’s value, and the
second argument is the form to evaluate. The last argument is
<span class="RktVal">#t</span> if exceptions are being captured (to display exception
results), <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._scribble-exn-~3estring))"></a><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-exn-~3estring%29%29" class="RktValDef RktValLink" data-pltdoc="x">scribble-exn->string</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exn?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: scribble/example | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-exn-~3estring%29%29" class="RktValDef RktValLink" data-pltdoc="x">scribble-exn->string</a></span></span><span class="hspace"> </span><span class="RktVar">handler</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">handler</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exn?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter that controls how exceptions are rendered by
<span class="RktSym">interaction</span>. Defaults to
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._if%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">if</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exn?</a></span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exn-message%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exn-message</a></span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._format%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">format</a></span><span class="hspace"> </span><span class="RktVal">"uncaught exception: ~s"</span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div></p><h5 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-source-pkg="scribble-doc" x-part-tag=""old-eval"">4.5.1<tt> </tt><a name="(part._old-eval)"></a><a name="(mod-path._scribble/eval)"></a>Legacy Evaluation</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._scribble%2Feval%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/eval</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">scribble-lib</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._scribble%2Feval%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/eval</span></a> library provides
an older interface to the functionality of <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a>.
The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a> library should be used, instead.</div></p><p>In addition to the forms listed below, <span class="RktSym">scribble/eval</span>
re-exports several functions from <span class="RktSym">scribble/example</span>:
<span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval%29%29" class="RktValLink" data-pltdoc="x">make-base-eval</a></span> <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-base-eval-factory%29%29" class="RktValLink" data-pltdoc="x">make-base-eval-factory</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-eval-factory%29%29" class="RktValLink" data-pltdoc="x">make-eval-factory</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._make-log-based-eval%29%29" class="RktValLink" data-pltdoc="x">make-log-based-eval</a></span>,
<span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._close-eval%29%29" class="RktValLink" data-pltdoc="x">close-eval</a></span>, and <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._scribble-eval-handler%29%29" class="RktValLink" data-pltdoc="x">scribble-eval-handler</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._interaction))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">interaction</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-options</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">maybe-eval</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">maybe-escape</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">maybe-no-errors</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-eval</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:eval</span><span class="hspace"> </span><span class="RktVar">eval-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-escape</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:escape</span><span class="hspace"> </span><span class="RktVar">escape-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-no-errors</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:no-errors?</span><span class="hspace"> </span><span class="RktVar">no-errors?-expr</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> from <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a>, except that</div></p><ul><li><p>the “Examples:” label is always supressed,</p></li><li><p>exceptions raised during the evaluation of a <span class="RktVar">datum</span> are
always rendered as errors, unless <span class="RktPn">#:no-errors?</span> is
specified with a true value; and</p></li><li><p>the <span class="RktPn">#:once</span> option is never implicitly used.</p></li></ul><p class="SHistory">Changed in version 1.14 of package <span class="stt">scribble-lib</span>: Added <span class="RktPn">#:no-errors?</span>,
<span class="RktSym">eval:no-prompt</span>, and
<span class="RktSym">eval:error</span>, and changed
<span class="RktSym">code:line</span> to support multiple
<span class="RktVar">datum</span>s.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._interaction0))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction0%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">interaction0</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span>, but without insetting the code via
<span class="RktSym"><a href="base.html#%28def._%28%28lib._scribble%2Fbase..rkt%29._nested%29%29" class="RktValLink" data-pltdoc="x">nested</a></span>.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:no-indent</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._interaction/no-prompt))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%2Fno-prompt%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">interaction/no-prompt</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">maybe-escape</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span>, but does not render each <span class="RktVar">datum</span> with a prompt.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:no-prompt</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._interaction-eval))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">interaction-eval</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span>, evaluates the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=quote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._quote%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">quote</a></span>d form of
<span class="RktVar">datum</span>, but returns the empty string and does not catch
exceptions (so <span class="RktSym">eval:error</span> has no effect).</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:hidden</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._interaction-eval-show))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval-show%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">interaction-eval-show</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="RktStxLink" data-pltdoc="x">interaction-eval</a></span>, but produces an element representing
the printed form of the evaluation result.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:result-only</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._racketblock+eval))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketblock%2Beval%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">racketblock+eval</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">maybe-escape</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Combines <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketblock%29%29" class="RktStxLink" data-pltdoc="x">racketblock</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="RktStxLink" data-pltdoc="x">interaction-eval</a></span>.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:no-result</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._racketblock0+eval))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketblock0%2Beval%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">racketblock0+eval</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">maybe-escape</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Combines <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketblock0%29%29" class="RktStxLink" data-pltdoc="x">racketblock0</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="RktStxLink" data-pltdoc="x">interaction-eval</a></span>.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:no-result</span> and
<span class="RktPn">#:no-indent</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._racketmod+eval))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._racketmod%2Beval%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">racketmod+eval</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-eval</span><span class="hspace"> </span><span class="RktVar">maybe-escape</span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Combines <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketmod%29%29" class="RktStxLink" data-pltdoc="x">racketmod</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction-eval%29%29" class="RktStxLink" data-pltdoc="x">interaction-eval</a></span>.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktPn">#:lang</span>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._def+int))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._def%2Bint%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">def+int</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">defn-datum</span><span class="hspace"> </span><span class="RktVar">expr-datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span>, except the <span class="RktVar">defn-datum</span> is
typeset as for <span class="RktSym"><a href="scribble_manual_code.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketblock%29%29" class="RktStxLink" data-pltdoc="x">racketblock</a></span> (i.e., no prompt) and a line of
space is inserted before the <span class="RktVar">expr-datum</span>s.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._defs+int))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defs%2Bint%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">defs+int</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">defn-datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">expr-datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._def%2Bint%29%29" class="RktStxLink" data-pltdoc="x">def+int</a></span>, but for multiple leading definitions.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktSym">eval:no-prompt</span> wrappers on
definitions, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._examples))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">examples</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span>, but with an “Examples:” label prefixed.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> from <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a>, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._examples*))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">examples*</a></span></span><span class="hspace"> </span><span class="RktVar">label-expr</span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span>, but using the result of <span class="RktVar">label-expr</span> in
place of the default “Examples:” label.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> from <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/example</span></a> with the
<span class="RktPn">#:label</span> option, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._defexamples))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defexamples%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">defexamples</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span>, but each definition using <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span> or
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-struct</a></span> among the <span class="RktVar">datum</span>s is typeset without a
prompt, and with line of space after it.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with <span class="RktSym">eval:no-prompt</span> wrappers on
definitions, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._defexamples*))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defexamples%2A%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">defexamples*</a></span></span><span class="hspace"> </span><span class="RktVar">label-expr</span><span class="hspace"> </span><span class="RktVar">maybe-options</span><span class="hspace"> </span><span class="RktVar">datum</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._defexamples%29%29" class="RktStxLink" data-pltdoc="x">defexamples</a></span>, but using the result of <span class="RktVar">label-expr</span> in
place of the default “Examples:” label.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with the <span class="RktPn">#:label</span> option and
<span class="RktSym">eval:no-prompt</span> wrappers on definitions, instead.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/eval..rkt)._as-examples))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._as-examples%29%29" class="RktValDef RktValLink" data-pltdoc="x">as-examples</a></span></span><span class="hspace"> </span><span class="RktVar">b</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Feval..rkt%29._as-examples%29%29" class="RktValDef RktValLink" data-pltdoc="x">as-examples</a></span></span><span class="hspace"> </span><span class="RktVar">label</span><span class="hspace"> </span><span class="RktVar">b</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">label</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._content~3f%29%29" class="RktValLink" data-pltdoc="x">content?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">b</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Adds an “examples” label to <span class="RktVar">b</span>, using either a default label
or the given <span class="RktVar">label</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._scribble/eval..rkt)._with-eval-preserve-source-locations))"></a><span title="Provided from: scribble/eval | Package: scribble-lib"><span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._with-eval-preserve-source-locations%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">with-eval-preserve-source-locations</a></span></span><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">By default, the evaluation forms provided by this module, such as
<span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29" class="RktStxLink" data-pltdoc="x">interaction</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span>, discard the source
locations from the expressions they evaluate. Within a
<span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Feval..rkt%29._with-eval-preserve-source-locations%29%29" class="RktStxLink" data-pltdoc="x">with-eval-preserve-source-locations</a></span> form, the source
locations are preserved. This can be useful for documenting forms that
depend on source locations, such as Redex’s typesetting macros.</div></p><p>Use <span class="RktSym"><a href="#%28form._%28%28lib._scribble%2Fexample..rkt%29._examples%29%29" class="RktStxLink" data-pltdoc="x">examples</a></span> with the <span class="RktPn">#:preserve-source-locations</span>
option, instead.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="scheme.html" title="backward to "4.4 Racket"" data-pltdoc="x">← prev</a> <a href="plt-manuals.html" title="up to "4 Scribbling Documentation"" data-pltdoc="x">up</a> <a href="srcdoc.html" title="forward to "4.6 In-Source Documentation"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|