Re: Scheme 48 Eclipse IDE

Christian Jaeger <[email protected]> Fri, 28 Nov 2014 19:05:46 +0100
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <CAEjYwfUDxE2kU=Ae1DOP12s-EfNDn1PqZ1AewPBrG+hpZB9XjA@mail.gmail.com>
--001a1134b9645f5cb20508ef1d23
Content-Type: text/plain; charset=UTF-8

2014-11-28 18:58 GMT+01:00 Christian Jaeger <[email protected]>:

> (let lp ()
>   (display ">. ")
>   (write (let ((v (eval (read))))
>     (if (and (number? v) (not (integer? v)))
>          (exact->inexact v)
>          v)))
>   (newline)
>   (lp))
>

Sorry, I should have tested on S48. The latter requires the second argument
to |eval| as defined by the standard. Thus:

(let lp ()
  (display ">. ")
  (write (let ((v (eval (read) (scheme-report-environment 5))))
           (if (and (number? v) (not (integer? v)))
               (exact->inexact v)
               v)))
  (newline) (lp))

(I don't know how to change this for R6RS, shame on me.)

Ch.

--001a1134b9645f5cb20508ef1d23
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
2014-11-28 18:58 GMT+01:00 Christian Jaeger <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</sp=
an>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style=
:solid;padding-left:1ex"><div class=3D"gmail_extra">(let lp ()</div><div cl=
ass=3D"gmail_extra">=C2=A0 (display &quot;&gt;. &quot;)</div><div class=3D"=
gmail_extra">=C2=A0 (write (let ((v (eval (read))))</div><div class=3D"gmai=
l_extra"><span style=3D"white-space:pre-wrap">=C2=A0       </span> =C2=A0 (=
if (and (number? v) (not (integer? v)))</div><div class=3D"gmail_extra"><sp=
an style=3D"white-space:pre-wrap">=C2=A0       </span>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0(exact-&gt;inexact v)</div><div class=3D"gmail_extra"><span style=3D"=
white-space:pre-wrap">=C2=A0       </span>=C2=A0 =C2=A0 =C2=A0 =C2=A0v)))</=
div><div class=3D"gmail_extra">=C2=A0 (newline)</div><div class=3D"gmail_ex=
tra">=C2=A0 (lp))</div><div class=3D"gmail_extra"></div></blockquote></div>=
<br>Sorry, I should have tested on S48. The latter requires the second argu=
ment to |eval| as defined by the standard. Thus:</div><div class=3D"gmail_e=
xtra"><br></div><div class=3D"gmail_extra"><div class=3D"gmail_extra">(let =
lp ()</div><div class=3D"gmail_extra">=C2=A0 (display &quot;&gt;. &quot;)</=
div><div class=3D"gmail_extra">=C2=A0 (write (let ((v (eval (read) (scheme-=
report-environment 5))))</div><div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0(if (and (number? v) (not (integer? v)))</div><div =
class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0(exact-&gt;inexact v)</div><div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0v)))</div><div class=3D"gmail_extra">=
=C2=A0 (newline) (lp))</div><div class=3D"gmail_extra"><br></div><div class=
=3D"gmail_extra">(I don&#39;t know how to change this for R6RS, shame on me=
.)</div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">Ch.=
</div></div></div>

--001a1134b9645f5cb20508ef1d23--