This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: setting a variable to a value from C?


On 6 Nov 1998, Russ McManus wrote:

> 
> A general guile question: from C how does one set the value of a
> variable?  I'm also concerned about interactions with the module
> system; how do I specify the the module where I want the variable to
> be created/set?
> 
> I'm trying to do stuff like this:
> 
>     SCM pair;
>     pair = scm_intern0("*current-ui*");
>     SCM_SETCDR(pair, ui_box(ui));
> 

sorry, I misunderstood your question.  I've never tried to set the cdr 
of an interned pair, but this should get the job done:

scm_sysintern("*current-ui*", ui_box(ui));

I assume ui_box returns a SCM value.  As far as Guile modules go, I have
no idea.  I'm not even sure how they work in the Scheme world. 


> -russ
> 
> --
> "It's logic Jim, but not as we know it."
> 

	Jay Glascoe
	jglascoe@jay.giss.nasa.gov