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

Library Element Definitions

Draft MDC Standard

7.1.6.2 Library Element Definitions

The definition of a libraryelement states which library the element belongs to, return value type, and full specification.

libraryelement names starting with a Z are reserved for implementors. libraryelement names starting with a Y are reserved for users. All other unused libraryelement names are reserved for future use.

A libraryelement definition is of the form:

    libraryelementdef::= libraryelement ^ library libraryresult [ ( L libraryparam ) ]
    libraryparam::= [ . ] name [ : [ libdatatype ] [ : libraryopt ] ]
    libraryresult::= [ : libdatatype ]
    libdatatype::=







BOOLEAN
COMPLEX
INTEGER
MATRIX
NAME
REAL
STRING
Z[unspecified]








    libraryopt::=

o
O


If a libraryparam starts with a period then this parameter is passed by reference.

Z is the initial letter reserved for implementation specific libdatatypes. All other values for libdatatypes are reserved for future extensions to the standard.

Input and output values to libraryelements undergo the appropriate data interpretation below:

  1. For BOOLEAN see 7.1.4.7 (Truth-value interpretation).
  2. COMPLEX numbers are represented as strings of the format REAL_"%"_REAL (that is, two REAL numbers separated by the % character). Any string has a value when interpreted as a complex number. The real part of the complex number is the numeric interpretation of the first "%" piece and the imaginary part is the numeric interpretation of the second "%" piece. The canonic representation of a complex number is a string created by concatenating the canonic numerical representation of the real part, a percent sign, and the canonic numerical representation of the imaginary part.
  3. For INTEGER see 7.1.4.6 (Integer interpretation).
  4. MATRIX values are represented as sparse arrays, in which only the defined nodes with two integer-valued subscripts will be accessed or modified. Any other nodes in the arrays are not considered part of the matrix, and do not affect and are not affected by the matrix functions. The string A[R,C] denotes a matrix A having R rows and C columns. The canonic representation of a matrix value contains no non-matrix array nodes.
  5. For NAME see 7.1.4.12 (Name value namevalue).
  6. For REAL see 7.1.4.5 (Numeric interpretation of data).
  7. STRING is a string made up of any characters and not constrained in format.

If no libdatatype is specified for a libraryparam or libraryresult then the libdatatype defaults to STRING.

If no libraryopt is specified then the libraryparam is mandatory. A libraryopt of O specifies that the libraryparam is optional.

Unless otherwise specified in their definitions, library elements are assumed to have the standard domain and range for their function, and no side effects. For each library element with a standard domain, all of its libraryparams can assume any valid values of their respective libdatatypes. Similarly, for each function with a standard range, the libraryresult and all of its output libraryparams can assume any valid values of their respective libdatatypes.

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.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 13-Sep-2014, 16:27:23.

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