The OUTPUT keyword introduces a ``print'' instruction which
allows all available informations to be recorded on files or printed
to the user's screen. The output file argument is optional and
is used to specify a valid file name to write the output string to. If
the file name ends with a
character, the information is appended
to the file, creating the file if it does not exist; the
is
removed from the file name. Otherwise any OUTPUT instruction
with a file name specified will overwrite a previously existing file
with that name. If the file name is not specified, the output string
is printed to the user's standard output, normally the screen unless
redirected.
The output string is a string of characters which must be enclosed in
double quotes, and can contain any character. Special characters like
tabs and newlines are introduced by escape sequences as in the C
language: the sequence
n specifies a newline,
t a tab, and
r a carriage return. Note
that newlines are not normally appended to output strings: the user
will have to add
n at the end of a string to cause
the newline to be output.
In output strings, the character $ introduces a macro name which will be substituted with its value before the string is printed. Most macro names have different values substituted according to the section of the file the OUTPUT instruction is in. Only the DATE macro will be substituted with the standard 26-characters UNIX date-time string regardless of where it's located.
Two macros, ID and SCORE, are always available. ID is substituted by the variable name in variable definition sections, and by the global ID in the preamble. The global ID is a string that can be passed to SVP in the command line, and is useful to distinguish the output of different runs. A common value of the global ID a list of the values of the parameters characterizing a simulation run. The macro SCORE is substituted with the global score in the preamble, and with the variable score in variable definition sections.
Test names can be used as macros in variable definition sections where those tests are used. The name of the test alone is substituted with the score for that particular test. If the test name is followed by an identificator in parentheses (with no spaces in between), the identificator is supposed to be one of the available test statistics for that particular test. So, if the user wants to record the slope of the regression line calculated during a STEADY test on file mydata.dat, a corresponding OUTPUT instruction could be
OUTPUT "The slope is: $STEADY(SLOPE)n" mydata.dat
When a macro is not recognized, no errors are generated to avoid spoiling batch runs consisting of many computationally-extensive simulations. Instead, the string (nil) is substituted to them. A good idea is to keep an eye on the output files (e.g. by means of the tee and grep commands) during the first simulations to check that every macro is used properly.