To start GT.M from a POSIX shell:
Execute
gtm
from your shell prompt:$ <path_to_gtm_installation_directory>/gtm
To start GT.M in UTF-8 mode from a POSIX shell:
First, set
$gtm_chset
toUTF-8
.$ export gtm_chset="UTF-8"
Execute the
gtm
script.$ <path_to_gtm_installation_directory>/gtm
To start GT.M from a C-type shell:
First source the
gtmschrc
script to set up a default GT.M environment. At your shell prompt, type:$ source <path_to_gtm_installation_directory>/gtmchrc
Run the
gtm
alias to start GT.M in direct mode.$ gtm
To start GT.M in UTF-8 mode from a C-type shell:
Set the enviornment variable gtm_chset to UTF-8.
$ setenv gtm_chset UTF-8
Source the gtmchrc script to set up default GT.M unicode environment.
$ source <path_to_gtm_installation_directory>/gtmchrc
Run the gtm alias to start GT.M in direct mode.
$ gtm
To start GT.M without using any script:
Define gtm_dist, gtm_log, gtm_tmp, gtmgbldir, and gtmroutines. Ensure that gtm_dist points to the location of your GT.M distribution.
Add gtm_dist to the system environment variable PATH.
Ensure that you have set an appropriate value for TERM.
If possible, add these environment variables in your login file so you do not have to create them again the next time you start your shell.
Set the following aliases to run GT.M and its utlities.
alias dse="$gtm_dist/dse" alias gde="$gtm_dist/mumps -run ^GDE" alias gtm="$gtm_dist/mumps -direct" alias lke="$gtm_dist/lke" alias mupip="$gtm_dist/mupip"
Run the
gtm
alias to start GT.M in direct mode.$ gtm
To start GT.M in UTF-8 mode without using any script:
Define gtm_dist, gtm_log, gtmgbldir, and gtmroutines. Ensure that gtm_dist points to the uft8 subdirectory of your GT.M distribution.
Set gtm_routines to include the utf8 subdirectory of your GT.M distribution. Note that the utf8 subdirectory includes all Unicode-related GT.M functionality. Type a command like the following:
$ gtmroutines=". $gtm_dist `echo $gtm_dist | sed 's/utf8\(\/\)*//'`"
Ensure that you have installed ICU 3.6 (or above) and have set appropriate values for LC_CTYPE, LC_ALL, LD_LIBRARY_PATH, and TERM.
If you have built ICU with symbol renaming enabled, set gtm_icu_version to an appropriate ICU verison.
Add gtm_dist to the system environment variable PATH.
Set gtm_chset to UTF-8.
If possible, add these environment variables in your login file so you do not have to create them again the next time you start your shell.
Set the following aliases to run GT.M and its utlities.
alias dse="$gtm_dist/dse" alias gde="$gtm_dist/mumps -run ^GDE" alias gtm="$gtm_dist/mumps -direct" alias lke="$gtm_dist/lke" alias mupip="$gtm_dist/mupip"
Type the following command to start GT.M in direct mode.
$ gtm
At the GT.M prompt, type the following command.
GTM>w $ZCHSET UTF-8 ; the output confirms UTF-8 mode.
![]() | Note |
---|---|
If you are configuring a GT.M environment without using the
|
GT.M has three invocation modes: compiler, direct, and auto-start. To invoke GT.M in these modes, provide the following arguments to the gtm script or the mumps command.
-direct: Invokes GT.M in direct mode where you can enter M commands interactively.
<list of M source files>: Invokes GT.M in compiler mode, invoke GT.M by entering a list of file names to compile as a argument. GT.M then compiles the specified programs into .o files. UNIX wildcards (* and ?) are acceptable within the file names.
-run
^routine_name
: -r invokes GT.M in auto-start mode. The second argument is taken to be an M entryref, and that routine is automatically executed, bypassing direct mode. Depending on the shell being used, you may need to put the entryref in quotes.
When executing M programs, GT.M incrementally links any called programs. For example, the command GTM> d ^TEST
links the object file TEST.o and executes it; if the TESTM
program calls other M routines, those are automatically compiled and linked.