/[guile]/guile/guile-core/doc/ref/deprecated.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/deprecated.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.3 by ossau, Fri Mar 29 20:11:13 2002 UTC revision 1.1.2.4 by ossau, Mon Apr 1 14:34:20 2002 UTC
# Line 5  Line 5 
5  @menu  @menu
6  * Shared And Read Only Strings::  * Shared And Read Only Strings::
7  * Sloppy Membership::           `Sloppy' list membership procedures.  * Sloppy Membership::           `Sloppy' list membership procedures.
8  * Strange Eval::                Strange variations on `eval'.  * Strange Eval::                Strange variations on @code{eval}.
9  * Close All Ports::             Closing all ports except some ...  * Close All Ports::             Closing all ports except some ...
10  * C Module Reg::                Old method for registering C modules.  * C Module Reg::                Old method for registering C modules.
11    * Obarray Symbols::             Obarray symbol manipulation.
12  * Removed Items::               Previously deprecated, now removed.  * Removed Items::               Previously deprecated, now removed.
13  @end menu  @end menu
14    
# Line 43  substring is an object that mostly behav Line 44  substring is an object that mostly behav
44  substring, except that it actually shares storage space with its parent  substring, except that it actually shares storage space with its parent
45  string.  string.
46    
47  @deffn {Scheme Procedure} make-shared-substring str [start [end]]  @deffn {Deprecated Scheme Procedure} make-shared-substring str [start [end]]
48  @deffnx {C Function} scm_make_shared_substring (str, start, end)  @deffnx {Deprecated C Function} scm_make_shared_substring (str, start, end)
49  Return a shared substring of @var{str}.  The arguments are the  Return a shared substring of @var{str}.  The arguments are the
50  same as for the @code{substring} function: the shared substring  same as for the @code{substring} function: the shared substring
51  returned includes all of the text from @var{str} between  returned includes all of the text from @var{str} between
# Line 138  now require strings: Line 139  now require strings:
139  ERROR: Wrong type argument (expecting STRINGP): /home/  ERROR: Wrong type argument (expecting STRINGP): /home/
140  @end lisp  @end lisp
141    
142  @deffn {Scheme Procedure} read-only-string? obj  @deffn {Deprecated Scheme Procedure} read-only-string? obj
143  @deffnx {C Function} scm_read_only_string_p (obj)  @deffnx {Deprecated C Function} scm_read_only_string_p (obj)
144  Return @code{#t} if @var{obj} is either a string or a symbol,  Return @code{#t} if @var{obj} is either a string or a symbol,
145  otherwise return @code{#f}.  otherwise return @code{#f}.
146  @end deffn  @end deffn
# Line 153  The following are equivalent to @code{me Line 154  The following are equivalent to @code{me
154  arguments that they are given.  They are deprecated because the lack of  arguments that they are given.  They are deprecated because the lack of
155  proper type-checking makes them dangerous.  proper type-checking makes them dangerous.
156    
157  @deffn {Scheme Procedure} sloppy-memq x lst  @deffn {Deprecated Scheme Procedure} sloppy-memq x lst
158  @deffnx {C Function} scm_sloppy_memq (x, lst)  @deffnx {Deprecated C Function} scm_sloppy_memq (x, lst)
159  This procedure behaves like @code{memq}, but does no type or error checking.  This procedure behaves like @code{memq}, but does no type or error checking.
160  Its use is recommended only in writing Guile internals,  Its use is recommended only in writing Guile internals,
161  not for high-level Scheme programs.  not for high-level Scheme programs.
162  @end deffn  @end deffn
163    
164  @deffn {Scheme Procedure} sloppy-memv x lst  @deffn {Deprecated Scheme Procedure} sloppy-memv x lst
165  @deffnx {C Function} scm_sloppy_memv (x, lst)  @deffnx {Deprecated C Function} scm_sloppy_memv (x, lst)
166  This procedure behaves like @code{memv}, but does no type or error checking.  This procedure behaves like @code{memv}, but does no type or error checking.
167  Its use is recommended only in writing Guile internals,  Its use is recommended only in writing Guile internals,
168  not for high-level Scheme programs.  not for high-level Scheme programs.
169  @end deffn  @end deffn
170    
171  @deffn {Scheme Procedure} sloppy-member x lst  @deffn {Deprecated Scheme Procedure} sloppy-member x lst
172  @deffnx {C Function} scm_sloppy_member (x, lst)  @deffnx {Deprecated C Function} scm_sloppy_member (x, lst)
173  This procedure behaves like @code{member}, but does no type or error checking.  This procedure behaves like @code{member}, but does no type or error checking.
174  Its use is recommended only in writing Guile internals,  Its use is recommended only in writing Guile internals,
175  not for high-level Scheme programs.  not for high-level Scheme programs.
# Line 176  not for high-level Scheme programs. Line 177  not for high-level Scheme programs.
177    
178    
179  @node Strange Eval  @node Strange Eval
180  @section Strange Variations on `eval'  @section Strange Variations on @code{eval}
181    
182  @code{eval2} was useful in previous Guile releases because the  @code{eval2} was useful in previous Guile releases because the
183  @code{eval} in those releases was a single argument @code{eval} that did  @code{eval} in those releases was a single argument @code{eval} that did
# Line 186  which to evaluate the specified code exp Line 187  which to evaluate the specified code exp
187  now R5RS-compliant, and @code{eval2} is obsolete and therefore  now R5RS-compliant, and @code{eval2} is obsolete and therefore
188  deprecated.  deprecated.
189    
190  @deffn {Scheme Procedure} eval2 obj env_thunk  @deffn {Deprecated Scheme Procedure} eval2 obj env_thunk
191  @deffnx {C Function} scm_eval2 (obj, env_thunk)  @deffnx {Deprecated C Function} scm_eval2 (obj, env_thunk)
192  Evaluate @var{exp}, a Scheme expression, in the environment  Evaluate @var{exp}, a Scheme expression, in the environment
193  designated by @var{lookup}, a symbol-lookup function.  designated by @var{lookup}, a symbol-lookup function.
194  Do not use this version of eval, it does not play well  Do not use this version of eval, it does not play well
# Line 205  invented. Line 206  invented.
206  In this Guile release, evaluation always preserves source property  In this Guile release, evaluation always preserves source property
207  information.  So @code{read-and-eval!} is now unnecessary.  information.  So @code{read-and-eval!} is now unnecessary.
208    
209  @deffn {Scheme Procedure} read-and-eval! [port]  @deffn {Deprecated Scheme Procedure} read-and-eval! [port]
210  @deffnx {C Function} scm_read_and_eval_x (port)  @deffnx {Deprecated C Function} scm_read_and_eval_x (port)
211  Read a form from @var{port} (standard input by default), and evaluate it  Read a form from @var{port} (standard input by default), and evaluate it
212  (memoizing it in the process) in the top-level environment.  If no data  (memoizing it in the process) in the top-level environment.  If no data
213  is left to be read from @var{port}, an @code{end-of-file} error is  is left to be read from @var{port}, an @code{end-of-file} error is
# Line 217  signalled. Line 218  signalled.
218  @node Close All Ports  @node Close All Ports
219  @section Closing All Ports Except Some @dots{}  @section Closing All Ports Except Some @dots{}
220    
221  @deffn {Scheme Procedure} close-all-ports-except . ports  @deffn {Deprecated Scheme Procedure} close-all-ports-except . ports
222  @deffnx {C Function} scm_close_all_ports_except (ports)  @deffnx {Deprecated C Function} scm_close_all_ports_except (ports)
223  [DEPRECATED] Close all open file ports used by the interpreter  [DEPRECATED] Close all open file ports used by the interpreter
224  except for those supplied as arguments.  This procedure  except for those supplied as arguments.  This procedure
225  was intended to be used before an exec call to close file descriptors  was intended to be used before an exec call to close file descriptors
# Line 254  For example, place this into a file "foo Line 255  For example, place this into a file "foo
255      (load-extension "libguile-foo-bar" "foobar_init")      (load-extension "libguile-foo-bar" "foobar_init")
256    
257    
258    @node Obarray Symbols
259    @section Obarray Symbol Manipulation
260    
261    Guile's module mechanism uses @dfn{obarrays}, which are hash tables that
262    map symbols to variables.  Guile 1.4 included a group of primitives that
263    could be used for the manipulation of the symbol-variable mappings in
264    such obarrays.
265    
266    However, considering the availability both of low-level procedures for
267    operating on hash tables in general (@pxref{Hash Tables}), and of a
268    dedicated API for module-related operations (@pxref{Modules}), the
269    intermediate set of obarray primitives is no longer useful, and ---
270    which is worse --- makes it more difficult to evolve the implementation
271    of Guile's module system.  Hence this set of primitives has now been
272    deprecated.
273    
274    If you have code using these functions, please change it to use either
275    hash table or module-related operations.
276    
277    @deffn {Deprecated Scheme Procedure} gentemp [prefix [obarray]]
278    @deffnx {Deprecated C Function} scm_gentemp (prefix, obarray)
279    Create a new symbol with a name unique in an obarray.
280    The name is constructed from an optional string @var{prefix}
281    and a counter value.  The default prefix is @code{t}.  The
282    @var{obarray} is specified as a second optional argument.
283    Default is the system obarray where all normal symbols are
284    interned.  The counter is increased by 1 at each
285    call.  There is no provision for resetting the counter.
286    @end deffn
287    
288    @deffn {Deprecated Scheme Procedure} intern-symbol obarray string
289    @deffnx {Deprecated C Function} scm_intern_symbol (obarray, string)
290    Add a new symbol to @var{obarray} with name @var{string}, bound to an
291    unspecified initial value.  The symbol table is not modified if a symbol
292    with this name is already present.
293    @end deffn
294    
295    @deffn {Deprecated Scheme Procedure} symbol-interned? obarray string
296    @deffnx {Deprecated C Function} scm_symbol_interned_p (obarray, string)
297    Return @code{#t} if @var{obarray} contains a symbol with name
298    @var{string}, and @code{#f} otherwise.
299    @end deffn
300    
301    @deffn {Deprecated Scheme Procedure} unintern-symbol obarray string
302    @deffnx {Deprecated C Function} scm_unintern_symbol (obarray, string)
303    Remove the symbol with name @var{string} from @var{obarray}.  This
304    function returns @code{#t} if the symbol was present and @code{#f}
305    otherwise.
306    @end deffn
307    
308    @deffn {Deprecated Scheme Procedure} string->obarray-symbol obarray string [soft?]
309    @deffnx {Deprecated C Function} scm_string_to_obarray_symbol (obarray, string, soft_p)
310    Intern a new symbol in @var{obarray}, a symbol table, with name
311    @var{string}.
312    
313    If @var{obarray} is @code{#f}, use the default system symbol table.  If
314    @var{obarray} is @code{#t}, the symbol should not be interned in any
315    symbol table; merely return the pair (@var{symbol}
316    . @var{#<undefined>}).
317    
318    The @var{soft?} argument determines whether new symbol table entries
319    should be created when the specified symbol is not already present in
320    @var{obarray}.  If @var{soft?} is specified and is a true value, then
321    new entries should not be added for symbols not already present in the
322    table; instead, simply return @code{#f}.
323    @end deffn
324    
325    @deffn {Deprecated Scheme Procedure} symbol-binding obarray string
326    @deffnx {Deprecated C Function} scm_symbol_binding (obarray, string)
327    Look up in @var{obarray} the symbol whose name is @var{string}, and
328    return the value to which it is bound.  If @var{obarray} is @code{#f},
329    use the global symbol table.  If @var{string} is not interned in
330    @var{obarray}, an error is signalled.
331    @end deffn
332    
333    @deffn {Deprecated Scheme Procedure} symbol-bound? obarray string
334    @deffnx {Deprecated C Function} scm_symbol_bound_p (obarray, string)
335    Return @code{#t} if @var{obarray} contains a symbol with name
336    @var{string} bound to a defined value.  This differs from
337    @var{symbol-interned?} in that the mere mention of a symbol
338    usually causes it to be interned; @code{symbol-bound?}
339    determines whether a symbol has been given any meaningful
340    value.
341    @end deffn
342    
343    @deffn {Deprecated Scheme Procedure} symbol-set! obarray string value
344    @deffnx {Deprecated C Function} scm_symbol_set_x (obarray, string, value)
345    Find the symbol in @var{obarray} whose name is @var{string}, and rebind
346    it to @var{value}.  An error is signalled if @var{string} is not present
347    in @var{obarray}.
348    @end deffn
349    
350    
351  @node Removed Items  @node Removed Items
352  @section Previously Deprecated Items Now Removed  @section Previously Deprecated Items Now Removed
353    

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26