next up previous contents index
Next:   DEFINE VARIABLE Up: The KEYBOARD INTERFACE: Command Previous:   CURVE STYLES


  DEDUCE FILE SEQUENCE

Often it is desired to run a series of data analysis operations on a whole series of files. This can be achieved by running a macro on a whole series of files using the "SEQUENCE" command (Section 15.90, Page [*]), or by writing a single macro with a loop which runs on different files (see Section 30, Page [*]).

When a macro is to be run on a series of files, it is necessary to deduce the file sequence. i.e. the number of the first and last file in the sequence, the base part of the file name, and the file extensions. DEDUCE FILE SEQUENCE allows a starting file name and an end file name to be entered, which may of course be program variables, and if possible deduces the parameters of the sequence, and sets a number of internal program variables.

e.g. If #FILE_1ST equals /users/a/smith/data/poly_001.dat and #FILE_LAST equals
/users/a/smith/data/poly_180.dat then:

Main menu: ENTER COMMAND [PLOT DATA]: DEDUCE
ENTER NAME OF STARTING FILE [fit2d_999.f2d]: #FILE_1ST
ENTER NAME OF END FILE [fit2d_001.f2d]: #FILE_LAST
Main menu: ENTER COMMAND [CONCATENATION]: LIST VARIABLES
##PREFIX = /users/a/smith/data/poly_
##START = 1
##END = 180
##STEP = 1
##VARIABLE = FALSE
##NUM_CHARS = 3
##POSTFIX =
##EXTENSION = .dat

This command is useful for creating macros which work with file series.


next up previous contents index
Next:   DEFINE VARIABLE Up: The KEYBOARD INTERFACE: Command Previous:   CURVE STYLES
Andrew Hammersley
2004-01-09