FR GS - Sets global 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 globally from all
following SPIDER procedures executed during this run.
'FR GS' differs from 'FR G' in that it first evaluates
any string variables from the setting string.
.VARIABLE NAME & ASSOCIATED VALUE: [string]value
[Enter string variable name (surrounded by []'s) and associated
alphanumeric string.]
NOTES
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.
Example.
FR G
[dir]/scratch/
FR G
[file]file000
FR GS
[file][dir][file]
VM
echo Path: [file]
EN
When procedure executes, operation sequence is :
.OPERATION: FR G
.SYMBOL NAME & ASSOCIATED VALUE: [dir]/scratch/
.OPERATION: FR G
.SYMBOL NAME & ASSOCIATED VALUE: [file]file000
.OPERATION: FR GS
.SYMBOL NAME & ASSOCIATED VALUE: [file][dir][file]
.OPERATION: VM
Path: /scratch/file000
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.