[m-rev.] for review: document how string comparison is implemented

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Feb 7 12:18:08 AEDT 2008


Could someone please review this.

On Tue, 29 Jan 2008, Julien Fischer wrote:

>
> Estimated hours taken: 0.2
> Branches: main
>
> Document what the string comparison operation for each backend is.
> (XXX Should the Erlang backend be documented here - it doesn't seem to be?)
>
> library/string.m:
> 	Document how string comparison is implemented.
>
> Julien.
>
> Index: string.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/library/string.m,v
> retrieving revision 1.269
> diff -u -r1.269 string.m
> --- string.m	30 Dec 2007 05:24:57 -0000	1.269
> +++ string.m	29 Jan 2008 03:51:20 -0000
> @@ -25,6 +25,14 @@
>  % When Mercury is compiled to .NET IL code, strings are represented as .NET
>  % `System.String's.
>  %
> +% The builtin comparison operation on strings is also implementation 
> dependent.
> +% In the current implementation, when Mercury is compiled to C, string +% 
> comparison is implemented using C's strcmp() function.  When Mercury
> +% is compiled to Java, string comparison is implemented using Java's
> +% String.compareTo() method.  When Mercury is compiled to .NET IL code
> +% string comparison is implemented using C#'s System.String.Compare()
> +% method.
> +%
>  %-----------------------------------------------------------------------------%
>  %-----------------------------------------------------------------------------%
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list