diff: reference manual fixes
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 23 04:13:06 AEDT 1999
Estimated hours taken: 0.5
Fix some errors in the reference manual pointed out
by David Powers <powers at ist.flinders.edu.au>.
doc/reference_manual.texi:
Document the fact that a pair of double quotes inside a string
stands for a single double quote, and that a pair of single
quotes inside a quoted name stands for a single single quote.
(This was always the intent -- it is also what the current
implementation implements and what that the ISO Prolog standard
requires.)
Also fix a typo: s/)/]/.
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/reference_manual.texi,v
retrieving revision 1.126
diff -u -r1.126 reference_manual.texi
--- reference_manual.texi 1999/02/21 10:09:39 1.126
+++ reference_manual.texi 1999/02/22 16:40:38
@@ -197,7 +197,11 @@
@item string
A string is a sequence of characters enclosed in double quotes (@code{"}).
-Strings may contain backslash escapes. @samp{\a} stands for ``alert''
+Within a string, two adjacent double quotes stand for a single double quote.
+For example, the string @samp{ """" } is a string of length one, containing
+a single double quote: the outermost pair of double quotes encloses the
+string, and the innermost pair stand for a single double quote.
+Strings may also contain backslash escapes. @samp{\a} stands for ``alert''
(a beep character), @samp{\b} for backspace, @samp{\r} for carriage-return,
@samp{\f} for form-feed, @samp{\t} for tab, @samp{\n} for newline,
@samp{\v} for vertical-tab. An escaped backslash, single-quote, or
@@ -216,7 +220,9 @@
A name is either an unquoted name or a quoted name.
An unquoted name is a lowercase letter followed by zero or more letters,
underscores, and digits. A quoted name is any sequence of zero or more
-characters enclosed in single quotes (@code{'}). Quoted names can contain
+characters enclosed in single quotes (@code{'}).
+Within a quoted name, two adjacent single quotes stand for a single
+single quote. Quoted names can also contain
backslash escapes of the same form as for strings.
@item variable
@@ -3674,7 +3680,7 @@
University of Melbourne Mercury implementation protects
@samp{not_thread_safe} code using a mutex:
C code that is not thread-safe has code inserted around it to obtain
-and release a mutex. All non-thread-safe C code shares a single mutex.]
+and release a mutex. All non-thread-safe C code shares a single mutex.)
@c XXX this can cause deadlocks if not_thread_safe C code calls
@c Mercury which calls C
--
Fergus Henderson <fjh at cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh at 128.250.37.3 | -- leaked Microsoft memo.
More information about the developers
mailing list