[m-rev.] diff: implement some formatting functions for .NET

Peter Ross peter.ross at miscrit.be
Tue Aug 28 19:46:41 AEST 2001


> Index: runtime/mercury_mcpp.cpp
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/runtime/mercury_mcpp.cpp,v
> retrieving revision 1.9
> diff -u -r1.9 mercury_mcpp.cpp
> --- runtime/mercury_mcpp.cpp	2001/08/27 12:15:36	1.9
> +++ runtime/mercury_mcpp.cpp	2001/08/27 15:30:10
> @@ -80,6 +80,18 @@
>  	return w[index];
>  }
>  
> +static bool list_is_cons(MR_Word w) {
> +	return (System::Convert::ToInt32(w[0]) != 0);
> +}
> +
> +static MR_Box list_get_head(MR_Word w) {
> +	return w[1];
> +}
> +
> +static MR_Word list_get_tail(MR_Word w) {
> +	return dynamic_cast<MR_Word>(w[2]);
> +}
> +
>  };
>  
Why the dynamic_cast for get_tail and not for get_head?

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