Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!uokmax!munnari.oz.au!bruce!alanf From: alanf@bruce.OZ (Alan Grant Finlay) Newsgroups: comp.lang.c Subject: "modulas" operator in C Keywords: semantics Message-ID: <1842@bruce.OZ> Date: 16 Feb 90 02:05:20 GMT Organization: Monash Uni. Computer Science, Australia Lines: 13 After 3 hours of tracking down a bug I found my C compiler didn't implement the modulas operator "%" properly. At least that's what I thought until on further investigation I found this in Kernighan and Ritchie's manual: "The binary % operator yields the remainder from division of the first expression by the second." In short it turns out that the meaning of remainder is machine dependent and normally this means (-1)%2 results in the value -1. This is a gripe that probably keeps recurring but specifically I have the following request. Would the C community stop referring to this operator as a modulas operator and call it something else like a "remainder" operator.