[m-rev.] for review: update docs for foreign language interface
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Nov 7 17:13:52 AEDT 2002
Thanks for the review.
On 07-Nov-2002, Peter Moulder <pmoulder at csse.monash.edu.au> wrote:
> ~~~~~
> e.g.@:
Fixed.
> > + at example
> > +:- pragma foreign_decl("C#", [...],
> > +"
> > + // [...]
> > + Console.WriteLine(""hello world"").
> > +").
> > + at end example
>
> I don't know C#, but I'd guess that the third-last line should end
> in `;' rather than `.'.
Fixed.
----------
Branches: main
Estimated hours taken: 0.1
doc/reference_manual.texi:
doc/user_guide.texi:
Fix Latex formatting: s/e.g./e.g.@:/g
doc/reference_manual.texi:
Fix a typo in a C# code example: s/./;/
Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.262
diff -u -d -r1.262 reference_manual.texi
--- doc/reference_manual.texi 31 Oct 2002 13:20:50 -0000 1.262
+++ doc/reference_manual.texi 7 Nov 2002 06:11:38 -0000
@@ -1459,7 +1459,7 @@
The three different variable sorts occupy different namespaces:
there is no semantic relationship between two variables of different sorts
-(e.g. a type variable and an ordinary variable) even if they happen to
+(e.g.@: a type variable and an ordinary variable) even if they happen to
share the same name.
(However, as a matter of programming style, it is generally a
bad idea to use the same name for variables of different sorts
@@ -2451,13 +2451,13 @@
for the third argument, not the more specific inst.
Note that attempting to call @samp{append} when the first two arguments do not
-have ground insts (e.g. @samp{list_skel(bound(g(free)))}) is a mode error
+have ground insts (e.g.@: @samp{list_skel(bound(g(free)))}) is a mode error
because it violates the constraint on the inst parameter.
To avoid having to repeat a constraint everywhere that an inst parameter occurs,
it is possible to list the constraints after the rest of the mode declaration,
following a @samp{<=}.
-E.g. the above example could have been written as
+E.g.@: the above example could have been written as
@example
:- mode append(in(list_skel(I)), in(list_skel(I)), out(list_skel(I)))
<= I =< ground.
@@ -5895,7 +5895,7 @@
@subsubsection Using pragma foreign_decl for C#
@samp{pragma foreign_decl} declarations for C# can be used to provide
-any top-level C# declarations (e.g. @samp{using} declarations
+any top-level C# declarations (e.g.@: @samp{using} declarations
or auxiliary class definitions) which are needed by C# code in
@samp{pragma foreign_proc} declarations in that module.
@@ -5911,7 +5911,7 @@
[will_not_call_mercury],
"
// here we can refer directly to Console rather than System.Console
- Console.WriteLine(""hello world"").
+ Console.WriteLine(""hello world"");
").
@end example
@@ -6144,7 +6144,7 @@
@subsubsection Using pragma foreign_decl for MC++
@samp{pragma foreign_decl} declarations for MC++ can be used to provide
-any top-level MC++ declarations (e.g. @samp{#include} or @samp{#using})
+any top-level MC++ declarations (e.g.@: @samp{#include} or @samp{#using})
which are needed by code in @code{pragma foreign_proc} declarations for MC++.
For example:
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.341
diff -u -d -r1.341 user_guide.texi
--- doc/user_guide.texi 6 Nov 2002 05:11:18 -0000 1.341
+++ doc/user_guide.texi 6 Nov 2002 23:00:45 -0000
@@ -3240,7 +3240,7 @@
The debugger incorporates a declarative debugger
which can be accessed from its command line.
Starting from an event that exhibits a bug,
-e.g. an event giving a wrong answer,
+e.g.@: an event giving a wrong answer,
the declarative debugger can find a bug which explains that behaviour
using knowledge of the intended interpretation of the program only.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list