[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No gh_set_x()?
From: |
Sam Tregar |
Subject: |
Re: No gh_set_x()? |
Date: |
Tue, 10 Jul 2001 20:35:04 -0400 (EDT) |
On Tue, 10 Jul 2001, Brett Viren wrote:
> 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.
Ok, I'll respond to that below. Maybe the original answerer can shed more
light on the subject.
> > `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.
Um, why not? It seems to me that given an SCM I should be able to set it
to the value given by another SCM and have that new value reflected
through whatever was pointing the the first SCM.
Perhaps there's a better way to ask for what I need - how would you
implement a "+=" procedure in C? It takes two arguments, adds them and
modifies the initial argument to contain the result:
> > * 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.
Hm, ok. The problem here is that by the time I get to the point where I'm
trying to call the non-existent gh_set_x() all I have is a single SCM.
How can I know if it's bound at the top-level or not?
-sam
- Re: No gh_set_x()?, (continued)
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, 2001/07/10
- Re: No gh_set_x()?,
Sam Tregar <=
- 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
- Re: Gurus? Care to re-explain the absense of gh_set_x() for me?, Alex Shinn, 2001/07/13