FR N - Read (sets) next global string variable from file

(8/28/09)

PURPOSE

Reads string from a text file and associates the string with a string variable. Initial invocation opens the text file and reads one string from the first line. Each following invocation reads another string from the opened file. The string (symbolic) variables are 'global' and are accessible from all SPIDER procedures following this operation. The operation 'FR NE' will close the file and allow use of another file.   Example.

SEE ALSO

FR [Read (sets) a local string variable]
FR F [Read (sets) global string variables from a file]
FR G [Read (sets) a global string variable]

USAGE

.OPERATION: FR N [fails]
  <or>
FR NE

[The optional output register variable will contain zero if the operation is a success. If the file does not exist or has no more lines left to be read then the register variable will be non-zero. If the optional register variable is present (e.g. [fails]) then a procedure will NOT stop with an error if the text file runs out of input lines. Operation 'FR NE' will close the file.]

.VARIABLE LIST FILE: variable_list
[Text file containing string variable values.]

.STRING VARIABLE NAME (ENCLOSED WITH[]): [coord_file]
[Enter symbolic variable name for the value which will be read from the file.]

NOTES

  1. 'FR NE' closes the file. Accessing a second variable list file while an earlier variable list file remains open will close the earlier file. Only a SINGLE variable list file can be in use at any one time.

  2. This operation is useful when writing procedures which need varying input values or when creating parallel SPIDER runs.

  3. If the string variable contains any register variables then register variable substitution will occur when the parameter is used, not at time of input.

  4. There should be a "carriage return" at end of last line of the file.

SUBROUTINES

SYMPAR, SETSYMPAR

CALLER

DRIV1