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

XECUTE

M[UMPS] by Example

Introduced in the 1977 ANSI M[UMPS] language standard.

Xecute X
The definition of the Xecute command states that the command Xecute X is equivalent to the command Do UNIQUENAME where the routine would contain a subroutine like:
UNIQUENAME ;
 <value of x>
 Quit

This equivalence will make it easier to understand what happens in the following examples.

Set X="WRITE ABC"
Xecute X

The value of local variable ABC will be written.

Set X="SET X=1 QUIT:A  SET X=3"
Xecute X

The Quit command terminates the subroutine inside the eXECUTEd string, and does not terminate the subroutine from which the string is XECUTEd.

Set X="SET X=1 GOTO PQR SET X=3"
Xecute X Write "Back here"

The Goto command transfers command to label PQR. When a Quit command is executed following that label, that Quit command would return control to the statement following the Xecute command, and the text "Back here" will be printed.

Set FIRST="SET X=3 "
Set SECOND=" SET A=2 "
Set THIRD="SET Q=999 "
If SPECIAL Set THIRD=" SET P=888 "
Xecute FIRST_SECOND_THIRD

There may be spaces at the end of a line of executeable code

Examples with naked references:

Xecute VALUE
Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
Xecute ^(3,4)

; naked indicator is now: ^ABC(1,3,
; Actual reference is: ^ABC(1,3,4)

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.

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 12-Sep-2014, 10:17:24.

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