This project has moved. For the latest updates, please go here.


Topics: Developer Forum, User Forum
Feb 29, 2008 at 7:26 PM
The mathematical term for what "a % b" does in C# is "modulo," i.e., "%" is the mod operator, which is short for "modulo operator." In Sandcastle-built documentation, the % operator is described in the class method index, and perhaps elsewhere, as "Modulus." Can this be fixed to use the mathetmatically correct term "Modulo"? The term "Modulus" is something else.
Feb 29, 2008 at 10:46 PM
The operator names are output by the compiler when it generates the XML comments (op_Modulus). You could probably hack the transforms to fix up the name but it's probably not worth it. Most people probably won't give it a thought and I think it's accepted that Modulus also refers to the "%" operator.

Mar 1, 2008 at 3:02 AM
In relation to the expressions "a mod b", "a modulo b", "a (mod b)", and "a % b", I have always seen, and written, the term "modulus" meaning "the second operand" (b in this case). Is it really generally accepted that "modulus" means the operator as well?

Most people might not give it a thought, but I do, and some users of my library will too. It's a math library.