Next: New Environment Variable E2MACROS
Up: EMME/2 NEWS 13 October 1992
Previous: Enhanced Transit Line Editor Module
Since their first introduction, way back in Release 2.0, the possibilities
offered by EMME/2 macros have been steadily increased. The initially
``dumb'' file play back mechanism has in the mean time become a complete
macro programming environment.
Release 6.0 continues in this tradition by enhancing the macro command
language even further, offering new possibilities for macro writers
that go far beyond what was possible up to now.
As this is not the place for explaining all the technical details that
are important for the experts in macro writing, here is just
a brief list of the most important new possibilities, without
getting too technical:
-
Up to 10 new text registers,
t0
-
t9,
can be used to store textual information in addition to the already existing
numerical registers. These text registers can be manipulated, compared and
tested for specified values.
-
The text register
t0
corresponds to the macro invocation parameters opens the possibility to implement default values for macro parameters,
or assign new values to these parameters. The same mechanism can also be
used in order to split a text input into individual words.
-
The names and descriptions of scalars can now be accessed in macros, using
the new substitutions text of the scalar.
-
An optional prompt string can now follow the
~*
command for interactive
text entry. This text will be displayed to prompt the user, replacing the
default prompt ``>>''. -
The access to data bank parameters has been greatly enhanced.
The new parameter register
p
can be used to access global, scenario and system parameters. System
parameters include information such as licence number, licence
size, host operating system (important if macro uses OS command escapes),
CPU time and current time/date information.
-
The possibilities of error recovery have been improved. Macros can now sense
the error number of the last error that occurred, as well as access the
accumulated total number of errors of type fatal or warning. This allows e.g.
a macro to detect and react to warnings, which was not possible in earlier
versions.
When a macro fails due to a fatal error (i.e. if the error is
not caught and acted upon by the macro itself), a message is displayed
indicating the file name and the line of the macro in which the error occurred.
-
Last but not least, one of the most important new features is no doubt
the possibility for the macro to control the dialog output. So far, we
associate running a macro with having lots of dialog
questions and answers scrolling at great speed over the screen. In Release 6.0,
it is possible to control exactly which part of the dialog input and output
is to be sent to the terminal and which part is to be suppressed - or even
saved into a text register. This way, macros can have their own identity,
by suppressing the dialog of the invoked modules and setting up their own
front end instead. Thus, the macro user is no longer exposed to details
of the macro implementation which are not important to him; instead he can
concentrate on the essentials.
Next: New Environment Variable E2MACROS
Up: EMME/2 NEWS 13 October 1992
Previous: Enhanced Transit Line Editor Module
Heinz Spiess,
EMME/2 Support Center,
Thu Jun 6 14:36:07 MET DST 1996