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

Numeric Data Values

1984 Version of ANSI Standard

3.2.4.1 Numeric Data Values

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.

  1. It may contain only digits and the characters "-" and " ." .
  2. At least one digit must be present.
  3. "." occurs at most once.
  4. The number zero is represented by the one-character string "0".
  5. The representation of each positive number contains no "-".
  6. 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.)
  7. The representation of each positive integer contains only digits and no leading zero.
  8. 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".)
  9. 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.

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 28-Nov-2011, 21:03:45.

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