[gambit-list] redefine macro variable

Marc Feeley feeley at iro.umontreal.ca
Mon Mar 23 13:35:54 EDT 2009


On 22-Mar-09, at 12:46 AM, Eduardo Cavazos wrote:

> Sorry if this is an FAQ...
>
> Is there any way around this:
>
>> (define time 0)
> *** ERROR IN (console)@1.9 -- Macro name can't be used as a  
> variable: time
>>
>
> Section 6.3 of the manual documents 'define-macro' but it doesn't go
> into this.

Gambit is complaining that "time" is a macro and it can't be used as a  
variable.  One way around it is to map "time" to a different name.   
This can be done with namespaces, such as

(namespace ("_#" time))

Marc




More information about the Gambit-list mailing list