Command-line values are used mostly for those parameters that are normally defaulted by the application. Defaulted parameters enable applications to have many options, say for controlling the appearance of some graphical output, without making routine operations tedious because of a large number of prompts. The values of normally defaulted parameters are given in the application specifications. You can also find them by obtaining online help on a specific parameter. They are enclosed in square brackets at the end of the parameter description.
ICL> kaphelp median param *
gives details of all parameters in application MEDIAN. Other packages have similar help commands. If you want to override one of these defaults, then you must specify the parameter's value on the command line.
When you are prompted you will usually be given a suggested default value in / / delimiters. You can choose to accept the default by pressing carriage return. For example, 64 is the suggested value below.
XDIM - x dimension of output array /64/ >
Alternatively, enter a different value
XDIM - x dimension of output array /64/ > 109
to override the default. Some defaults begin with an @.
IN - Input image /@starfield/ >
These are associated with files (text and HDS ) and devices (graphics and tape). If you want to override the default given, you do not have to prefix your value with an @, e.g.
DEVICE - Name of display device /@xwindows/ > x2w
There are rare cases when the syntax is ambiguous, and it is then that you need to include the @. Strings describes when the @ is needed.
From both ICL and the shell the default value can be edited to save typing by first pressing the <TAB> key. The editor behaves like the shell command-line editor.
Defaults may change as data are processed. Often the current (last) value of the parameter will be substituted, or a dynamic value is suggested depending on the values of other parameters. Here is an example comprising a loop within an application.
NDF - NDF to examine /@horsehead >
CENTRE - Position at the centre of the listing /'64 64'/ > 100 120
. . . .
. . . .
. . . .
CENTRE - Position at the centre of the listing /'100 120'/ >
SIZE - The dimensions (in pixels) of the area to be listed /7/ >
. . . .
. . . .
. . . .
and so on. Notice that the current values of the centres are the suggested values at the second prompt.
Current values of parameters are stored in a parameter file, and
so they persist between sessions. For tasks run from the shell, this
is an HDS file $ADAM_USER/
application
.sdf,
where
application
is the name of the application. (If the
environment variable ADAM_USER is not defined the parameter
file is situated in $HOME/adam).
Unfortunately, tasks invoked from ICL use a monolith parameter file, which contains the individual application parameter files for the members. So for example, KAPPA has kappa_mon.sdf, kapview_mon.sdf, and ndfpack_mon.sdf stored in the same directory as the individual files. This duality means that there are two independent sets of current values for each task depending on where you ran it from.
The parameter file should not be deleted unless the parameters
values are to be completely reset, or the file has been corrupted in
some way. If you suspect the latter case, say after
interrupting a task,
run
HDSTRACE
on the file to check its integrity.
KAPPA --- Kernel Application Package