[Openmcl-devel] #. expansion

Ron Garret ron at flownet.com
Tue Jun 1 18:20:35 PDT 2021


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