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

RLOAD

M[UMPS] by Example

Approved for inclusion in a future M[UMPS] language standard.

This command copies parts of a routine from implementation specific internal storage into a local or global variable. Typical practice is to edit the copy that is obtained in this way by modifying the local or global variable in question, and then re-create the routine in implementation specific internal storage by means of the RSave command.

Any keywords in the argument of the command are processed in strict left-to-right order. When multiple equivalent parameters are encountered, the last occurrence processed will define the action(s) to be taken.

If the argument of this command specifies a non-existent routine, an error will occur (M88).

RLoad DIK:LOCVAR
Copy a routine into a local array. The value of LOCVAR(1) will be the same as $Text(+1^DIK).

Assume that the routine DEMO consists of the following lines:

DEMO ; This is an example
 Write !,"This is the second line"
 Write !,"Last line with WRITE command"
 Quit

And assume that the array EDIT contains the following nodes:

Kill EDIT
Set EDIT(2)="This disappears"
Set EDIT(2,1)="This remains"
Set EDIT(3.5)=" ;This stays as well"
Set EDIT("Last Word")=" ;The final word"

After the command RLoad DEMO:EDIT, the array will contain:

EDIT(1)="DEMO ; This is an example"
EDIT(2)=" Write !,""This is the second line"""
EDIT(2,1)="This remains"
EDIT(3)=" Write !,""Last line with WRITE command"""
EDIT(3.5)=" ;This stays as well"
EDIT(4)=" Quit"
EDIT("Last Word")=" ;The final word"

Examples with naked references:

RLoad ROUTINE:VARIABLE
Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
RLoad NAME:^(3,4)

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

Note: the code will be stored into ^ABC(1,3,4,1), ^ABC(1,3,4,2) etcetera, but the naked indicator will remain ^ABC(1,3,.

RLoad ROUTINE:VARIABLE:PARAMETERS
Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
RLoad NAME:^(3,4):(KEY1=^(5,6):KEY2=^(7,8))

; Fetch the value for the first parameter from ^(5,6) = ^ABC(1,5,6)
; naked indicator is now: ^ABC(1,5,
; Fetch the value from ^(7,8) = ^ABC(1,5,7,8)
; naked indicator is now: ^ABC(1,5,7,
; Store code in ^(3,4) = ^ABC(1,5,7,3,4)
Note: the code will be stored into ^ABC(1,5,7,3,4,1), ^ABC(1,5,7,3,4,2) etcetera, but the naked indicator will remain ^ABC(1,5,7,3,.

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 15-Nov-2023, 18:55:03.

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