diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-09-02 23:57:49 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-09-02 23:57:49 +0000 |
commit | 90a5894d05ea7ee10fa68e7410b280afdc541daa (patch) | |
tree | 541096194014d1b09ba999f69a11d42c5f165f46 /doc/ref/scheme-data.texi | |
parent | 2886a7750253383fd845579c6d1d356e0e3f83d3 (diff) | |
download | guile-90a5894d05ea7ee10fa68e7410b280afdc541daa.tar.gz |
(Symbol Primitives): In gensym, cross reference
uninterned symbols, use @w{} on " g" prefix to avoid any chance of a
line break obscuring it.
Diffstat (limited to 'doc/ref/scheme-data.texi')
-rwxr-xr-x | doc/ref/scheme-data.texi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/ref/scheme-data.texi b/doc/ref/scheme-data.texi index 03ad950df..7fa4ac6bd 100755 --- a/doc/ref/scheme-data.texi +++ b/doc/ref/scheme-data.texi @@ -2743,15 +2743,16 @@ code. The @code{gensym} primitive meets this need: @deffnx {C Function} scm_gensym (prefix) Create a new symbol with a name constructed from a prefix and a counter value. The string @var{prefix} can be specified as an optional -argument. Default prefix is @samp{ g}. The counter is increased by 1 +argument. Default prefix is @samp{@w{ g}}. The counter is increased by 1 at each call. There is no provision for resetting the counter. @end deffn The symbols generated by @code{gensym} are @emph{likely} to be unique, since their names begin with a space and it is only otherwise possible to generate such symbols if a programmer goes out of their way to do -so. The 1.8 release of Guile will include a way of creating -symbols that are @emph{guaranteed} to be unique. +so. Uniqueness can be guaranteed by instead using uninterned symbols +(@pxref{Symbol Uninterned}), though they can't be usefully written out +and read back in. @node Symbol Props |