FR LS - Sets local string variable using current string values

(02/02/09)

PURPOSE

Associates a file name template or any other alphanumeric string with a string (symbolic) variable. Reads input from current procedure or terminal. The string variable is available only inside the SPIDER procedure where this operation was executed. 'FR LS' differs from 'FR L' in that it first evaluates any string variables from the setting string.

SEE ALSO

FR L [Read (sets) a local string variable]
FR GS [Sets global string variable using current string values]
FR G [Read (sets) a global string variable]
RR [Read (Set) Register variables]

USAGE

.OPERATION: FR LS

.VARIABLE NAME & ASSOCIATED VALUE: [string]value
[Enter string's name (surrounded by []'s) and associated alphanumeric string.]

1. Example.

FR L
[dir]/scratch/
FR L
[file]file000
FR LS
[file][dir][file]
VM
echo Path: [file]
EN

When procedure executes, operation sequence is :


.OPERATION: FR L


.SYMBOL NAME & ASSOCIATED VALUE: [dir]/scratch/


.OPERATION: FR L


.SYMBOL NAME & ASSOCIATED VALUE: [file]file000


.OPERATION: FR L


.SYMBOL NAME & ASSOCIATED VALUE: [file][dir][file]


.OPERATION: VM

Path: /scratch/file000

NOTES

  1. This operation is useful when writing long procedures as a variable can be initialized to contain a string at the top of a procedure, then the variable e.g. [raw_file] can be used throughout this and following procedures. If the string's value later changes then it only has to be altered at one location in the procedure.

  2. This operation can be used to change the value of an existing string using the current value of the string, without getting caught by run-time-recursion as shown in the above example.

SUBROUTINES

RDPR, SYMPAR, SETSYMPAR, SUBSYMPAR, PARSESYMPAR

CALLER

DRIV1