From: Chris Hanson Date: Wed, 13 Mar 2002 05:47:01 +0000 (+0000) Subject: Add definitions for LINK-VARIABLES and UNBIND-VARIABLE. X-Git-Tag: 20090517-FFI~2200 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c79c2dab8dfd2e7e5ffb90137bad9a2c720b1cb3;p=mit-scheme.git Add definitions for LINK-VARIABLES and UNBIND-VARIABLE. --- diff --git a/v7/doc/ref-manual/scheme.texinfo b/v7/doc/ref-manual/scheme.texinfo index 6210db8c9..a614207d0 100644 --- a/v7/doc/ref-manual/scheme.texinfo +++ b/v7/doc/ref-manual/scheme.texinfo @@ -2,7 +2,7 @@ @iftex @finalout @end iftex -@comment $Id: scheme.texinfo,v 1.115 2002/03/01 03:23:23 cph Exp $ +@comment $Id: scheme.texinfo,v 1.116 2002/03/13 05:47:01 cph Exp $ @comment %**start of header (This is for running Texinfo on a region.) @setfilename scheme.info @settitle MIT Scheme Reference @@ -51,7 +51,7 @@ Free Documentation License". @title{MIT Scheme Reference Manual} @subtitle Edition 1.96 @subtitle for Scheme Release 7.7.0 -@subtitle 28 February 2002 +@subtitle 13 March 2002 @author by Chris Hanson @author the MIT Scheme Team @author and a cast of thousands @@ -13357,6 +13357,28 @@ If neither @var{names} nor @var{values} is specified, the environment will have no initial bindings. @end deffn +@deffn procedure link-variables environment1 symbol1 environment2 symbol2 +Defines @var{symbol1} in @var{environment1} to have the same binding as +@var{symbol2} in @var{environment2}, and returns an unspecified value. +Prior to the call, @var{symbol2} must be bound in @var{environment2}, +but the type of binding is irrelevant; it may be a normal binding, an +unassigned binding, or a keyword binding. Signals an error if +@var{symbol1} isn't definable in @var{environment1}, or if @var{symbol2} +is unbound in @var{environment2}. + +By ``the same binding'', we mean that the value cell is shared between +the two environments. If a value is assigned to @var{symbol1} in +@var{environment1}, a subsequent reference to @var{symbol2} in +@var{environment2} will see that value, and vice versa. +@end deffn + +@deffn procedure unbind-variable environment symbol +If @var{symbol} is bound in @var{environment} or one of its ancestor +environments, removes the binding, so that subsequent accesses to that +symbol behave as if the binding never existed. Returns @code{#t} if there +was a binding prior to the call, and @code{#f} if there wasn't. +@end deffn + @node Input/Output, Operating-System Interface, Environments, Top @chapter Input/Output