[m-rev.] for review: mercury implementation of string__format
Ralph Becket
rafe at cs.mu.OZ.AU
Fri Nov 22 10:00:07 AEDT 2002
Peter Moulder, Friday, 22 November 2002:
>
> (after converting the integer Int to an int). I've written some untested
> suggested replacement code below; though you may well decide that it
> isn't worth bothering over.
>
> Short = integer__int(Int),
> ( Short < 10 ->
> char__to_int('0', BaseVal)
> ;
> char__to_int('a', AVal),
> BaseVal is AVal - 10
> ),
You could be even more concise with
BaseVal = ( if Short < 10 then char__to_int('0')
else char__to_int('a') - 10 )
- Ralph
--------------------------------------------------------------------------
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