[m-rev.] for review: update docs for foreign language interface

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 1 01:32:00 AEDT 2002


On 31-Oct-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> On Thu, Oct 31, 2002 at 11:50:59PM +1100, Fergus Henderson wrote:
> > Even this may be an overspecification for C#.  The C# code shouldn't
> > care if the Mercury argument gets mapped to a C# "ref" parameter, a C#
> > "out" parameter, or a C# local variable.  It shouldn't care whether the
> > Mercury implementation uses pass-by-reference or copy-in copy-out.
> > (For the IL interface, on the other hand, it does matter, since IL
> > uses different instructions to reference by-ref parameters than
> > local variables.)
>
> Actually the C# code does need to care, as explained by the code below.
> The initial value isn't needed for "out x" as any value passed in will
> be ignored.  This crops up when calling a mercury predicate which has
> been exposed using pragma export.

It would make a difference for the C# equivalents of "pragma import" or
"pragma export", but those are not yet supported (or at least not yet
documented!) for the .NET back-end.  It should not make any difference
for "pragma foreign_proc".

Note that "pragma export" is part of the C interface, which is not yet
supported for the .NET back-end.

-- 
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