This eValid value extraction capability allows a user to extract $NAME=value assignments pairs from lines in an auxiliary file. You need to do this when the number of pairs is too large to be edited into the actual eValid command line.
As shown in the syntax description below -- which is also included in the eValid script definition files -- the user can edit passages like this into a script: !filename[|line]. This makes it possible to instantiate an entire line of values into the script by reading them from the specified file. If |line is not present then only the 1st line of the file is used.
Construction Applies To
The !filename[|line] construction can only appear in a restricted set of eValid commands and switches, basically those which already provide for passing $NAME=value pairs to the current or a called script. These commands are:
Here is an example filename contents with several lines:
Contents Of Line... 1 2 3 4 $VAL1=100 $VAL2=200 $VAL3=300 ... $VAL1=101 $VAL2=201 $VAL3=301 ... $VAL1=102 $VAL2=202 $VAL3=302 ... $VAL1=103 $VAL2=203 $VAL3=303 ...
The construction !filename implies the entire 1st line of the file.
The construction !filename|1 implies the entire 1st line of the file (same as above).
The construction !filename|4 implies the entire 4th line of the file.
The construction !filename|5 returns a #SYNTAX ERROR because there is no 5th line.
Technical Note and Warning
In technical terms this construction allows the extraction of selected lines from a file as a character string, and the subsequent instantiation of that string into an eValid script command. Caution must be exercised to assure that the extracted line, when inserted into the eValid command, is a syntactically legal file. A common mistake is to forget to put "'s around the !filename|N, where the Nth line includes interior blank characters.
Value Extraction Command SyntaxThis command syntax provides a way to incorporate selected values extracted from a file into regular eValid parametric locations.
This information is similar to what is supplied in a Data Synthesis file, but is more oriented to taking the output from single lines of a spreadsheet type output file.
|Edit||This syntax can appear in those commands where a $NAME=value
parameter can appear, namely:
In addition the !filename construction can appear as the argument of a -DATA switch in the command line interface.
The purpose of this structure is to pass values from the named file into the current command line. The initial "!" distinguishes this structure from a $NAME=value structure.
This structure is used when there are many $NAME=value parameters to assign, or if the $NAME=value parameters are arranged in a table of lines e.g. from a spreadsheet.
The !filename[|line] structure cannot have unescaped blank characters; if blanks are required they must be enclosed in "'s.
The content of the material placed in the script is NOT checked for syntactic correctness. So it will be prudent to make certain that the material instantiated is syntactically clean.
Error messages are issued if
the named file is not found,
or if the required line in the file does not exist.
When errors are detected empty strings are returned as the value of the construct.