<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Does this help: </div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">#lang racket</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(define-namespace-anchor top)</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(parameterize ((current-namespace (namespace-anchor->namespace top)))</font></div><div><font class="Apple-style-span" color="#000000"> (eval '(define x 10))</font></div><div><font class="Apple-style-span" color="#000000"> (namespace-variable-value 'x))</font></div></blockquote></div><div><div><br></div></div><div><br></div><div>eval takes a namespace and you need to supply it explicitly (as an argument) or implicitly (via a parameter setting). </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div><div>On Nov 17, 2012, at 1:06 AM, Monica Tomson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
Hi,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
When I use <code style="margin:0px;padding:1px 5px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-repeat:initial initial">eval</code> on an S-Expression, where there are something like <code style="margin:0px;padding:1px 5px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-repeat:initial initial">(define len (...))</code>, racket screams at me <code style="margin:0px;padding:1px 5px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-repeat:initial initial">define: not allowed in an expression context in: (define len (make-length 10))</code></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
My questions are:</p><ul style="margin:0px 0px 1em 30px;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);list-style-position:initial;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
<li style="margin:0px;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:transparent;word-wrap:break-word;background-repeat:initial initial">How to make <code style="margin:0px;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-repeat:initial initial">eval</code> work on definition?</li>
<li style="margin:0px;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:transparent;word-wrap:break-word;background-repeat:initial initial">If <code style="margin:0px;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-repeat:initial initial">eval</code> is not designed to work on definitions, then is there some workarounds that can make it work?</li>
</ul><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
I appreciate any help!</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
Thanks,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:13.600000381469727px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.600000381469727px">
Monica</p>
____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></blockquote></div><br></body></html>