[Openmcl-devel] #. expansion

dave at synergy.org dave at synergy.org
Tue Jun 1 23:14:44 PDT 2021


Thank you, kindly!

-----Original Message-----
From: Ron Garret <ron at flownet.com> 
Sent: Tuesday, June 1, 2021 6:21 PM
To: dave at synergy.org
Cc: openmcl-devel at clozure.com
Subject: Re: [Openmcl-devel] #. expansion

You need to wrap the defconstant in en EVAL-WHEN so that it will take effect
while the file is being compiled, like so:

(eval-when (:compile-toplevel) (defconstant x 1))

On Jun 1, 2021, at 6:00 PM, dave at synergy.org wrote:

> If I compile a file as follows:
> 
> (defconstant x 1)
> 
> And then attempt to use #.x to place the integer value into subsequent 
> forms, I get an unbound variable x error.
> 
> In my code I use x to declaim types, as well as :type forms in 
> defclass/defstruct, etc.  I suspect attempting to use #.x in a deftype 
> form would also fail.
> 
> How does one do this?  It works in sbcl, but that doesn't mean I am using
#.
> Correctly.
> 
> 	Thanks,.
> 	Dave
> 
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel





More information about the Openmcl-devel mailing list