HOME GUIDE OPERATIONS DOCS FAQ TECHNIQUES FORMATS INSTALL NEW TIPS WEB LINKS WADSWORTH

RR - Read Register variables

(5/27/2008)

PURPOSE

To read value(s) into register variable(s). Useful to set registers inside a SPIDER procedure at run time.

SEE ALSO

RR G [Read Register variables - Global]
RR C [Read Register variables - Copy from global]
RR S [Read Register variable - from list of variables]

USAGE

.OPERATION: RR [var1],[var2],[var3],...
RR X11,X12,X13,...

IN THE INTERACTIVE SESSION:

RR [var1],[var2],[var3]

.VALUE(S): 4.,5,6
[Enter the floating point value(s) to be put into listed register variables: [var1],[var2],[var3]. In this form the operation is equivalent to the operations '[var1] = 4', followed by: '[var2] = 5', followed by: '[var3] = 6' . Indeed, it offers no advantage over these simple operations, except that it allows multiple register variables to be set on a single line.]

WITHIN A PROCEDURE CALLING ANOTHER PROCEDURE, WHERE A SOLICITATION PROMPT DOES NOT FOLLOW THE OPERATION :

RR [mag]
4.
[A procedure containing the 'RR' operation NOT followed by a solicitation prompt reads its input from the succeeding line in the same procedure. The value may either be explicitly entered (4.), declared as the contents of a register variable of the calling procedure (e.g. [var20]), or as a symbol present in the calling procedure [var_sym]. The value entered in any of the three forms will be stored in register variable [mag].]

WITHIN A PROCEDURE CALLING THE INTERACTIVE SESSION, WHERE A SOLICITATION PROMPT FOLLOWS THE OPERATION:

RR [mag],..
? ENTER MAGNIFICATION ?

[A procedure containing the 'RR' operation followed on the next line by a solicitation prompt e.g. ? ENTER MAGNIFICATION ? produces the following prompt in the interactive session]:

? ENTER MAGNIFICATION ? 4.
[The magnification value may either be explicitly entered (4.), declared as the contents of a register variable already defined within the interactive session (e.g. [var20]), or as a symbol already defined withinin the interactive session. The value entered in any of the three forms will be stored in register variable [mag].]

WITHIN A PROCEDURE CALLING ANOTHER PROCEDURE, WHERE A SOLICITATION PROMPT FOLLOWS THE OPERATION:

RR [mag],..
? ENTER MAGNIFICATION ? [A procedure containing the 'RR' operation followed on the next line by a solicitation prompt (e.g. ? ENTER MAGNIFICATION ?) reads its input from the succeeding line in the calling procedure. In the calling procedure the magnification value may either be explicitly entered (4.), declared as the contents of a register variable of the calling procedure (e.g. [var20]), or as a symbol present in the calling procedure [var_sym]. The value entered in any of the three forms will be stored in register variable [mag].]

NOTES

  1. Unless you have used operation 'MD' with option () ON 'RR' can NO LONGER be used within a DO-loop to enter a set of numbers successively into a register variable. Use 'RR S' instead.
    e.g.
    DO x10=1,5
    RR S [cuttoff]

  2. 3,8.1,0.12,5.0,8.55
    x10
    .
    .
    ENDDO
    For iteration =1, [cuttoff] will be filled with the value 4.3, for iteration =2, [cuttoff] will be filled with the value 8.1.3, and so forth.

  3. 'RR' may be used within a DO-loop to enter a single set of numbers into multiple registers:
    DO I=1,5
    RR [x],[y],[z]
    (4,8,12)
    .
    .
    .
    ENDDO
    In each iteration: [x],[y],[z] will be filled with the same respective values: 4, 8, 12.

SUBROUTINES

READRQ, REG_SET, SHRINKQ, CHKSTR

CALLER

DRIV1

© Copyright Notice /       Enquiries: spider@wadsworth.org

BACK TO SPIDER BACK TO WADSWORTH