Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer

ssvn

M[UMPS] by Example

Right Hand Pointer

Structured system variables (ssvn in metalanguage terminology) behave like global variables when used as parameters of the functions $DATA and $ORDER. When used in arguments of SET, MERGE and KILL commands, their behavior is different: either such usage is not allowed, but if it is allowed, there usually is a side-effect that is specific for the structured system variable in question.

In general, the structured system variables provide a directory for a specific aspect of the M[UMPS] language. In a number of cases, the structured system variables are used to manipulate 'meta-information' about the entities that are described in them.

Names of structured system variables may be returned by references to the function $QUERY. In such cases, a "canonic" form of the name will be returned, in which all parts that may be abbreviated are spelled out fully, and in which all parts that are case insensitive are spelled in upper case only.


^$C[HARACTER], ^$D[EVICE], ^$DI[SPLAY], ^$E[VENT], ^$G[LOBAL], ^$J[OB], ^$LI[BRARY], ^$L[OCK], ^$R[OUTINE], ^$S[YSTEM], ^$W[INDOW], ^$Y[...]


Window Attributes
Gadget Attributes
Choice Attributes
Event Attributes
Event Information

Structured system variables can be referenced in many ways. A "normal" reference would look like
Set copy=^$name(1,"abc",3)

In the 1984 ANSI M[UMPS] language standard, the concept of "multi-level indirection" was introduced. This way of referencing separates a "root", which can be either just a name or a name with one or more subscripts, from a list of subscripts, which means that the above reference could be written in a number of different ways as well:
Set root="^$name",copy=@root@(1,"abc",3)
Set root="^$name(1)",copy=@root@("abc",3)
Set root="^$name(1,""abc"")",copy=@root@(3)
Set root="^$name(1,""abc"",3)",copy=@root

This feature also offers a simple mechanism to display a complete (sub)tree of a structured system variable:

Show(root)  Write:$Data(@root)#2 !,root," = ",@root
Set sub="" For  Set sub=$Order(@root@(sub)) Quit:sub="" Do Show($Name(@root@sub))
Quit
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-2017 MUMPS Development Committee;
Copyright © Examples: 1995-2017 Ed de Moel;
Copyright © Annotations: 2003-2017 Jacquard Systems Research.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

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 08-Jan-2016, 18:06:02 .

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