☜ | ## Numeric Data Values## 1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |

All variables, local, global, and special, have values which are either defined or undefined. If defined, the values may always be thought of and operated upon as strings. The set of numeric values is a subset of the set of all data values.

Only numbers which may be represented with a finite number of decimal digits are representable as numeric values. A data value has the form of a number if it satisfies the following restrictions.

- It shall contain only digits and the characters "-" and ".".
- At least one digit must be present.
- "." occurs at most once.
- The number zero is represented by the one-character string "0".
- The representation of each positive number contains no "-".
- The representation of each negative number contains the character "-" followed by the representation of the positive number which is the absolute value of the negative number. (Thus, the following restrictions describe positive numbers only.)
- The representation of each positive integer contains only digits and no leading zero.
- The representation of each positive number less than
1 consists of a "." followed by a nonempty digit string with no
trailing zero. (This is called a
*fraction*.) - The representation of each positive non-integer
greater than 1 consists of the representation of a positive
integer (called the
*integer part*of the number) followed by a fraction (called the*fraction part*of the number).

Note that the mapping between representable numbers and representations is one-to-one. An important result of this is that string equality of numeric values is a necessary and sufficient condition of numeric equality.

Copyright © Standard Documents; 1977-2022 MUMPS Development Committee;

Copyright © Examples: 1995-2022 Ed de Moel;

Copyright © Annotations: 2003-2008 Jacquard Systems Research

Copyright © Annotations: 2008-2022 Ed de Moel.

This page most recently updated on 28-Nov-2011, 21:03:45 .

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