This is the mail archive of the guile@sourceware.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: docstrings in Guile!



Great! I always said there was something really cool about that Greg
fellow, but I didn't realize I wasn't talking about myself >;'). One
thing I would like to see, though, is a way of adding documentation to
a file as a whole; this would be great for adding concept and
internals documentation for bits like the garbage collector and the
evaluator (which is not to say that it needs to be done right now, but
it's something to think about, at least :).

"Greg J. Badros" <gjb@cs.washington.edu> writes:

> It is useful to have two functions that copy in different directions so
> that substrings can be copied back and forth within a single string.  If
> you wish to copy text from the left-hand side of a string to the
> right-hand side of the same string, and the source and destination
> overlap, you must be careful to copy the rightmost characters of the
> text first, to avoid clobbering your data.  Hence, when @var{str1} and
> @var{str2} are the same string, you should use
> @code{substring-move-right!} when moving text from left to right, and
> @code{substring-move-left!}  otherwise.  If @code{str1} and @samp{str2}
> are different strings, it does not matter which function you use.")

Actually, that's not really true anymore; it doesn't matter which one
you use, since memmove will do things correctly in either case. The
left and right are basically for backwards compatibility, though they
probably should be removed in favour of one substring-move! function.

-- 
Greg

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