Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Arithmetic Operators

1977 Version of ANSI Standard

3.3.1 Arithmetic Binary Operators

The binary operators + - * / \ # are called the arithmetic binary operators. They operate on the numeric interpretations of their operands, and they produce numeric (in one case, integer) results.

 +  produces the algebraic sum.
- produces the algebraic difference. * produces the algebraic product.
/ produces the algebraic quotient. Note that the sign of the quotient is negative if and only if one argument is positive and one argument is negative. Division by zero is erroneous.
\ produces the integer interpretation of the result of the above division.
# produces the value of the left argument modulo the right argument. It is defined only for nonzero values of its right argument, as follows.
A # B = A - (B * floor (A/B) )
where floor(x) = the largest integer < x.
Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

This page most recently updated on 15-Nov-2023, 13:17:03.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)