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

Variables

1990 Version of ANSI Standard

2.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 generally available to all routines executed within the process’ lifetime. MUMPS does include certain constructs, the New command and parameter passing, which limit the availability of certain variables to specific routines or parts of routines. See 2.2.2.3 for a further discussion of variables and variable environments.

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.

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)