On Mon, May 23, 2005 at 08:54:19PM +0000, [EMAIL PROTECTED] wrote:
: 
: There are actuall two usefull definition for %.  The first which Ada calls 
'mod' always returns a value 0<=X<N and yes it has no working value that is an 
identity.  The other which Ada calls 'rem' defined as follows:
: 
: Signed integer division and remainder are defined by the relation: 
: 
: A = (A/B)*B + (A rem B)
: 
:    where (A rem B) has the sign of A and an absolute value less than the 
absolute value of B. Signed integer division satisfies the identity: 
: 
: (-A)/B = -(A/B) = A/(-B)
: 
: It does have a right side identity of +INF.

I think % should behave as Perl 5 has it, especially insofar as it
coerces to integer.  That doesn't mean we can't have "mod" and/or
"rem" variants that have other semantics.  Infix operators are pretty
much in their own namespace anyway, so they won't clobber sub names.

Larry

Reply via email to