Dan scripsit:
> Maybe I'm just to tired, but the following doesn't
> seem right:
> 
> cafe$ csi
> #;1> (let ((o (current-output-port)))
>        (eval `(write 1 ,o)))
> Error: invalid syntax: #<output port (stdout)>
> 
> It works in SISC, but bombs in Guile and Scsh. What am
> I missing? And how can I pass a port value to an
> eval'd expression ?

You need to use ',o rather than ,o; a port object can't appear unquoted
in a Scheme form.  Some implementations allow arbitrary unquoted data
objects in forms, but that's an extension -- for example, in Chez you
can write "(define foo ())" instead of "(define foo '())".

-- 
John Cowan    <[EMAIL PROTECTED]>     http://www.ccil.org/~cowan
But no living man am I!  You look upon a woman.  Eowyn I am, Eomund's daughter.
You stand between me and my lord and kin.  Begone, if you be not deathless.
For living or dark undead, I will smite you if you touch him.


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to