[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Equivalent to set! in gh_ interface?
From: |
Michael Livshin |
Subject: |
Re: Equivalent to set! in gh_ interface? |
Date: |
14 Feb 2001 19:10:49 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake) |
Brett Viren <address@hidden> writes:
> I can't seem to find a gh_set() C function. What is the equivalent to
> the scheme `set!' procedure when calling from C?
`set!' is not a procedure. it's an "overloaded" syntax for two
different things:
* changing the binding of a lexical variable. this is impossible to
express in C.
* changing the binding of a top-level variable. this would be
possible to do if the concept of a top-level variable (or a module)
was somehow exported in the gh_ interface, but it is not.
so I guess that you want to achieve the effect of `set!'ing a
top-level variable. `gh_define' should do the trick, I believe.
--
Think of C++ as an object-oriented assembly language.