[m-dev.] for review: Add new library predicate to reversibly encode two ints in a single int.

Peter Schachte schachte at cs.mu.OZ.AU
Fri Jan 21 17:15:39 AEDT 2000


On Wed, Jan 19, 2000 at 07:12:58AM +1100, Fergus Henderson wrote:
> On 18-Jan-2000, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > +% XXX we really should check that 0 <= Value < Factor and raise an exception
> > +% if not.  But for reasons of efficiency, we don't.
> 
> But I think that for a standard library predicate it would probably be a
> better idea to do the check.

Ok.  But how do I raise an exception from pragma c_code?  The
exception doc doesn't give any help on this.  I don't want to do the
check in Mercury, because then the check would be done in both modes.

-- 
Peter Schachte                     I don't believe in collective guilt, but
mailto:schachte at cs.mu.OZ.AU        I do believe in collective responsibility.
http://www.cs.mu.oz.au/~schachte/      -- Audrey Hepburn 
PGP: finger schachte at 128.250.37.3  
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list