Using the |
The
Shell] |
mmx-light |
–––––––––––––––––––––––––––––––
|:*) Welcome to Mathemagix-light 0.4 (*:|
|––––––––––––––––––––––––––––––|
| This software falls under the GNU General Public License |
| It comes without any warranty whatsoever |
| www.mathemagix.org |
| (c) 2001–2010
|
–––––––––––––––––––––––––––––––
If you use the interpreter in a textual context, several shortcuts can be very useful such as:
[Ctr-A], [Ctr-E] to go to the beginning or end of the instruction line,
, for the previous and next instruction lines,
[tab] for name completion,
[Meta-return] to add an extra line to the current
instruction line when using a text terminal. Note that on several
platforms the
Different modes are available:
type_mode? := true; to print the type information with the result of an evaluation in the interpreter.
time_mode? := true; to print the time needed to evaluate an instruction line when it is bigger than 1 ms.
debug_mode? := true; to print debug information when an error occurs;
quiet_mode? := true; to print only the input command and opt result of an evaluation (no prompt, no banner);
A classical way to develop
|
It can be used from the interpreter as follows:
Mmx] |
include "mmxlight/step1.mmx" |
Mmx] |
f 5 |
The interpreter can be used directly with a file:
|
|
If this code is saved into a file, say mean, it can be used as follows:
|
provided that the command mmx-light is available.
The command to load and use the types and functions exported by an
external library is
|
Here the dynamic library libmmxpackage.so will be searched in the loading path (see variable LD_LIBRARY_PATH or DYLD_LIBRARY_PATH).
The first time the shell is launched it creates a .mathemagix in the home directory. A warning message is printed.
The file .mathemagix/etc/boot.mmx is automatically loaded at startup. This is the right place to customize the shell and to load the packages you frequently use. In order to load packages you can proceed as follows:
|
Prior to user's boot file a global boot file (usually /usr/local/etc/mathemagix/boot.mmx) is loaded. In case you wish to disable both boot files use the option –noboot within the mmx-light command.
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.
Help on functions and types can be obtained with the
Mmx] |
help Generator Generic |
Available functions
Mmx] |
help infix + |