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

Number of Subscripts

1995 Version of ANSI (Equivalent to Current ISO Version) of Standard

2.3.2 Number of subscripts

There is no explicit limit on the number of distinct local variable nodes which may be defined, but there is an implicit limit based on the number of subscripts that may be defined for any local variable reference. The number of subscripts in a local variable is limited in that, in a local array reference, the total length of the array reference must not exceed the maximum string length (see 2.8). The length of an array reference is calculated as follows:

assuming an array reference in the form

name(i1,i2, ... ,in)
   N = $L(name)
   I = $L(i1) + $L(i2) + ... + $L(in)

where each subscript (i1 through in) is either a numlit or a sublit

   L = n

then the total length of an array reference is

   N + I + ( 2 * L ) + 15

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:46.

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