\chapter{Miscellaneous}

\section{PLT command files}

PLT commands can also be entered {\it via} a command file.
For example, if you often enter the sequence of commands
\, {\tt FOnt~Roman} \, followed by \, {\tt CSize~1.3},
then you could create a file called {\tt NICE.PCO} that contains the lines
\begin{verbatim}
FOnt Roman
CSize 1.3
\end{verbatim}
To execute these commands inside PLT, all you need to type is
\begin{verbatim}
PLT> @NICE
\end{verbatim}
A default file extension \verb@.PCO@ is assumed.
Thus command files provide a way to enter several
and/or complicated commands easily.

Note that the reference to a command file is a legal PLT command
that can appear in a QDP file.
Since this is a PLT command,
QDP itself will not open and read the command file.
Hence, QDP commands and data lines cannot be entered {\it via} a command file.
Command files serve two important uses in QDP files.  First, they
provide a way to enter the same set of commands to several files.
Second, for long data files, editing the QDP file can be tedious.
Hence, you can edit it once to enter a reference to the command file.
Thereafter, whenever you want to change the PLT command list, you
need only to edit the command file.

PLT searches up to three different directories for the specified
indirect command.
The current directory is always searched first.
If the file is not found in the current directory then PLT
tries to translate the logical name (under VMS) or environment
variable (under UNIX or DOS) called MY\_XCOMS.
If MY\_XCOMS has been defined, then PLT searches the specified
directory.
If the file still has not been found then PLT searches the
\verb@XANADU:[LIB.XCOMS]@ directory.
This three level search allows you to create system-wide files,
user-wide files, and directory specific files.
For example, many locations create a file \verb@HARD.PCO@ in the
\verb@XANADU:[LIB.XCOMS]@ directory that (1) creates a hardcopy file
and (2) spools the file to the printer (done using the \verb@$@ command
to spawn a job to spool the plot to the printer).
This then allows all users on that system to use
\begin{verbatim}
PLT> @HARD
\end{verbatim}
to immediately print a hardcopy.
If you do not like something about the existing {\tt @HARD} command
then you can easily create a new private version of this command.
First copy the file to one of your own directories,
modify the file, and define MY\_XCOMS to contain
the name of the directory containing the new version.
Once this has been done, PLT will find and run your version of the command
instead of the system installed version.

It is possible to use parameters with indirect command files.
The parameter values are entered on the same line that
opened the indirect command file.
Thus,
\begin{verbatim}
PLT> @test one two three
\end{verbatim}
would cause PLT to open and read the \verb@TEST.PCO@ file with three
parameters ``\verb@one@'', ``\verb@two@'', and ``\verb@three@''.
If \verb@n@ is a number then the sequence \verb@%n%@ will be replaced
with the nth parameter.
For the above example, \verb@%1%@ will be replaced with `\verb@one@',
\verb@%2%@ with `\verb@two@', {\it etc.}
The following illustrates a possible indirect file that could use
up to three parameters:
\begin{verbatim}
LABel X %1%
LABel Y %2%
LABel T %3%
\end{verbatim}
If you fail to enter all three parameters, then \verb@%n%@ will be
replaced with a null string for the unentered parameters.

It is possible for one indirect file to call another indirect file
and pass in parameters.
Thus,
\begin{verbatim}
@deeper first %2% %3%
\end{verbatim}
is a valid line in an indirect command file.
In this example, the first parameter is ``\verb@first@'',
whereas the next two parameters will be set equal to
parameters 2 and 3 of the current script.
Also quotes can be used to denotes a single parameter with embedded
spaces, or other `magic' characters.
Thus the line,
\begin{verbatim}
@file "This is all one" two three
\end{verbatim}
contains three parameters, and the first parameter is the string
`\verb@This is all one@'.

\section{Version control}
New features are constantly being added to PLT, and so it is important
to keep track of these changes.
There are three places where changes are noted.
First, the PLT \verb@VErsion@ command can be used to identify the
date of the most recent change to the version of PLT linked into the program
you are using.
If certain commands do not appear to work then you should check this
number.
Often you will find that the program has not been linked for a while
and as a result the
command that you are trying to use was added after the last link.

The second place in which version numbers are recorded is the on-line
help file.
The \verb@HElp VErsion@ command will list all recently-added new
features and when they were made.
A serious attempt is made to ensure that on-line help is updated as
the software is modified.
For best results on your system,
you should also update the on-line help every time you update PLT
itself.
However, there is no requirement for these two version numbers to
match.
Thus, when you install a new version of PLT it is not necessary to
immediately relink all software that uses it.

Finally the printed manual is updated about once a year.  Therefore,
it can be slightly out of date.
