Using the |
This section describes how to use the
From a terminal, the
|
At first run the following message should last several seconds, according to the performances of your computer:
|
This means that the fundamental librairies are being compiled. At next run, the message still appears but lasts just the time needed to check that these compiled libraries are up to date.
Whenever the interpreter has been compiled with the GNU readline library, several shortcuts are available such as
[Ctr-A], [Ctr-E] to go at the beginning or end of the instruction line,
, for the previous and next instruction line,
[tab] for name completion,
[Meta-return] to add an extra line to the current
instruction line. Note that on several platforms the
For more information and customization of the keyboard interface, please refer to the documentation of the GNU readline library.
Within an interactive session, ending a line with a ';' actually means finishing with a null instruction. As a consequence this extra ';' prevents from printing the output of the previous instruction.
|
In order to quit the interpreter one can type [Ctr-d], or call the function exit that takes the return value of the mmi command as an argument.
|
For a short list of terminals (xterm, xterm-color, xterm-256color), the color mode of the interpreter can be activated by adding the following option to the command line:
|
The
|
In this case, colors can be punctually disabled as follows:
|
Supported terminals are specified in
The behavior of the interpreter can be modified according to the following command line options:
The command line option –help summarizes the usage of mmi, and –version returns the current version of mmi.
The following options are passed to the compiler mmc for compiling dynamic librairies at runtime: –diff, –gdb, –keep-cpp, –no-cache, –no-warnings, –optimize, –timings, –verbose.
Signatures and source locations of functions can be obtained via the help command as follows:
|
The latter source location corresponds the actual file where the input command is temporarily saved in. Help on types is also available:
|
File inclusion is performed via the include
function, as for the compiler. If the file to be included or one of
its dependencies contains foreign declarations, for
importing or exporting C++ functions, then the
necessary dynamic librairies are automatically compiled and loaded.
During the compilation the message
|
In case you are sure that all the dynamic libraries you are going to use in an interpreter session are already compiled then you might want to use the –no-glue option in order to discard checking if these dynamic libraries are up to date.
If the compiler and interpreter have been compiled with passing the –enable-verify option to the configure script, then a low level debugger is made available by adding –exe-debugger to the mmi command. The features of the debugger are rather limited but are essentially useful to understand casual bugs, and to display the actual builtin C++ types being used. The interactive commands of this debugger are the following:
set interactive mode.
unset interactive mode.
set display of expressions.
unset display of expressions.
set display of values.
unset display of values.
go directly to next step.
step into the intermediate.