<div>hello</div><div>I have made kind of calculator</div><div>as like following code</div><div>#lang scheme</div><div>(define ns (make-base-namespace))</div><div>(define (calc)</div><div>  (let ((expression (read)))</div><div>
    (if (eq? expression &#39;exit)</div><div>        (exit)</div><div>        (printf &quot;~A ~n&quot; (eval expression ns))))</div><div>  (calc))</div><div>(calc)</div><div><br></div><div>since I learned big-bang function,</div>
<div>I am intending to making more graphical program</div><div>which read from user and display texts and when user hit the enter button,</div><div>the written string evaluated and pop out to the window </div><div>(without command line prompt)</div>
<div>but I still stuck at convert string to evaluatable data </div><div><br></div><div>my source code(still underconstruction) is looks like this</div><div>#lang scheme</div><div>(require 2htdp/image)</div><div>(require 2htdp/universe)</div>
<div>(define ns (make-base-namespace))</div><div>(define result &quot;&quot;)</div><div>(define command &quot;&quot;)</div><div>(define input (open-input-string command))</div><div>(define output (open-output-string))</div>
<div>(define (draw n)</div><div>  (overlay (text (string-append command &quot;=&quot; result)15 &quot;blue&quot;) (square 400 &quot;outline&quot; &quot;black&quot;)))</div><div>(define (keyboard n key)</div><div>  (cond </div>
<div>        [(not (equal? key &quot;\r&quot;)) (set! command (string-append command key))]</div><div>        [(equal? key &quot;\r&quot;) (begin </div><div>                            (write command output)</div><div>                            (set! result (eval (read input) ns)))])n)</div>
<div>(big-bang 0</div><div>          (on-tick add1)</div><div>          (on-draw draw)</div><div>          (on-key keyboard))</div><div><br></div><div>I dare not ask for correcting my whole source code</div><div>I need an little advice from you</div>
<div>what I have to do for change string to evaluatable code?</div><div><br></div><div>thanks in advanced</div><div><br></div><div>sorry for messy code</div>