Specifications
SERIES 3/3A PROGRAMMING GUIDE
2-6
The program editor mode is available on all machines. In this mode there is no access to the style and
emphasis subsystems, the corresponding menu commands being replaced by options to "translate", "run",
"show error" and set "indentation".
In this mode, the first letter of the alias info denotes the nature of the program that is being edited. It
actually identifies the program to invoke to effect any "translate" and (possibly) "run" commands from the
user. The generic name of this program is
sys$prg?.img
, with the question mark being filled in from the
first letter of the alias info. Thus the
Prog
alias has
'O'
for the first letter of its alias info, and so the OPL
translate/run program
sys$prgo.img
is used. In contrast, the
Script
editor from the communications ROM
has
'S'
for the first letter of the alias info, so that the program
sys$prgs.img
is used.
In program editor mode the second letter of the alias info should be
'R'
if the program is of a type that
understands "run" instructions in addition to "translate" ones. Any other second character disables the
"run" command option. The following three letters (e.g.
'OPO'
or
'SCO'
) denote both the expected file
extension and the expected top-level directory where any translated output will by default be placed. (This
information is used by the editor when offering the user a suitable filename to "run").
On the Series 3a a final
'*'
character may be added to the alias info. This has the effect of adding an "S3
Translate" menu option.
The remaining modes are not available on Series 3 machines.
Alias info that consists of a single
'$'
character selects a plain text editing mode. In this case the
program-related menu options are suppressed, with only an "indentation" option being offered.
A variant on the
Word
mode is set by alias info that consists of a single
'/'
character. This behaves in a
similar way to the
Word
application, with the exception that a specific template file is loaded whenever a
new file is created. The template must have the same name as the aliased application and must be located
on the current drive at the time the new file is created. Thus, an alias created from the following
.ma
file:
Letter.LET
\LET\
1083
Word
/
would, on creation of a new file, automatically load the template file
\wdr\letter.wrt
, provided it exists on
the current drive. Note that, in this mode, the value
80
must
be added into the application type number. If
it is not, the automatic loading of the template is disabled.
How aliasing works
Part of the mechanism of aliasing is handled by the System Screen:
•
creating a new file list
•
listing the appropriate files in the new file list
•
allowing the user to assign a new application button to the new file list
•
creating a suitable command line to pass to the relevant application, when the user chooses to
start an instance of the alias (by pressing
ENTER
on an entry in the file list).
However, other parts of the mechanism of aliasing rely on the application paying suitable attention to the
details of the command line passed to it. Failure to do this will diminish the effect.
Thus even passive aliasing relies on some cooperation from the application being aliased. For example,
an application that is determined that it knows what its public name is (say
Word
) and which writes this to
DatProcessNamePtr
(see below) in all cases, despite any different public name being passed to it on the
command line, will frustrate the intent of any aliasing application:
•
any application button assigned to the alias by the user will be ineffective
•
running instances of the alias will appear (in bold) in the wrong file list in the System Screen.
This is just one reason why all serious applications should analyse the command line passed to them, as
part of their initialisation procedures.
There are routines in both the Hwif library and the Hwim dyl to assist in analysing the command line.










