RR S - Read Register variable - from list of variables

(12/5/2011)

PURPOSE

To read value(s) from a list of values into a register variable(s). Useful to change register variables while inside a 'DO' loop.   Example.

SEE ALSO

RR [Read (Set) Register variables]
DO [Start of a loop (Scripting operation)]

USAGE

.OPERATION: RR S [var1],[var2]

.VALUE(S): 1,2,3,4.,5,6.0,7,8,9,10
[Enter the list of floating point value(s) to choose from. Maximum number of values is 150. Continuation lines are supported if the last value on a line is a comma.]

.POSITION WITHIN LIST: 4,5
[Here the fourth and fifth values from the list will be selected and the values placed in the register variables specified on the operation line. The number of values to be selected is determined by the number of register variables on the operation line.]

NOTES

  1. 'RR S' may be used within a DO-loop to enter a set of numbers successively into a register variable:
    DO [iter]=1,5
    RR S [cutoff]
    4.3, 8.1, 0.12, 5.0, 8.55
    [iter]
    ~~~
    ~~~
    ENDDO

    For iter=1, [cutoff] will be filled with the value;   4.3,
    For iter=2, [cutoff] will be fulled with the value;   8.1,
    and so forth.

    In releases of SPIDER prior to version: 20 this could be done using the convention that any set of parameter inputs inside a 'DO LOOP' without an enclosing brace of '()' would automatically be treated as a list selected by the loop index. Sets of parameter input inside a 'DO LOOP' with an enclosing brace of '()' would be treated as a constant list of values. This behavior is the most common source of problems in SPIDER procedures and has been dropped in version 20++.

SUBROUTINES

READRQ, REG_SET, SHRINKQ, CHKSTR

CALLER

DRIV1