[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No gh_set_x()?
From: |
Brett Viren |
Subject: |
Re: No gh_set_x()? |
Date: |
Tue, 10 Jul 2001 20:04:25 -0400 (EDT) |
Sam Tregar writes:
> On Tue, 10 Jul 2001, Brett Viren wrote:
>
> > I asked this a while back. You can use gh_define().
>
> I had assumed gh_define() established top-level bindings like (define).
> How is this a replacement for a gh_set_x()?
I guess to get the equiv of set! you need to check if the symbol
exists before using gh_define(). But, I am no expert. Below is the
reply I got when I asked this. Hope it helps.
-B.
Michael Livshin writes:
> 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.
>
Re: No gh_set_x()?, Brett Viren, 2001/07/10
- Re: No gh_set_x()?, Sam Tregar, 2001/07/10
- Re: No gh_set_x()?,
Brett Viren <=
- Re: No gh_set_x()?, Sam Tregar, 2001/07/10
- Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/12
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Martin Grabmueller, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Martin Grabmueller, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Thien-Thi Nguyen, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Alex Shinn, 2001/07/13
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Sam Tregar, 2001/07/13