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

Variables

1984 Version of ANSI Standard

3.2.2 Variables

The MUMPS standard uses the terms local variables and global variables somewhat differently from their connotation in certain other computer languages. This section provides a definition of these terms as used in the MUMPS environment.

A MUMPS routine, or set of routines, runs in the context of an operating system process. During its execution, the routine will create and modify variables that are restricted to its process. It can also access (or create) variables that can be shared with other processes. These shared variables will normally be stored on secondary peripheral devices such as disks. At the termination of the process, the process specific variables cease to exist. The variables created for long term (shared) use remain on auxiliary storage devices where they may be accessed by subsequent processes.

MUMPS uses the term local variable to denote variables that are created for use during a single process activation. These variables are not available to other processes. However, they are available to all routines executed within the processes lifetime. Although the concept of limiting the environment of certain local variables to given routines or subroutine domains is under discussion for inclusion in the MUMPS language, no such specification is included as a part of this revision of the MUMPS Standard.

A Global variable is one that is created by a MUMPS process, but is permanent and shared. As soon as it has been created, it is accessible to other MUMPS processes on the system. Global variables do not disappear when a process terminates. Like local variables, global variables are available to all routines executed within a process.

The two basic differences between MUMPS definitions of local and global variables are: 1) there is no implied restriction of environment within a process attached to either local or global variables; and 2) global variables are immediately available to be shared with other processes active on a MUMPS system, whereas local variables cannot be shared with other processes on the same system.

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, 09:48:43.

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