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
to UTF-8
and LC_CTYPE or LC_ALL to any usable UTF-8 locale.
$ export gtm_chset="UTF-8" $ export LC_CTYPE="en_US.utf8"
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>/gtmcshrc
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 environment variable gtm_chset to UTF-8 and LC_CTYPE or LC_ALL to any usable UTF-8 locale.
$ setenv gtm_chset UTF-8 $ setenv LC_CTYPE en_US.utf8
Source the gtmchrc script to set up default GT.M UTF-8 environment.
$ source <path_to_gtm_installation_directory>/gtmcshrc
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.
Consider adding 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® support related GT.M functionality.
Ensure that you have installed ICU 3.6 (or above) and have LC_CTYPE or LC_ALL set to a usable UTF-8 locale.
Set LD_LIBRARY_PATH and TERM to appropriate values.
If you have built ICU with symbol renaming enabled, set gtm_icu_version to an appropriate ICU version.
Add gtm_dist to the system environment variable PATH.
Set gtm_chset to UTF-8.
Consider adding 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 utilities.
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 shell globbing to resolve wild-cards (* and ?) in 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 your shell, 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> do ^TEST
links the object file TEST.o and executes it; if the TESTM
program calls other M routines, those are automatically compiled and linked.
Caution | |
---|---|
When possible, GT.M verifies that MUMPS, MUPIP, DSE and LKE reside in $gtm_dist. If the path to the executable and the path to $gtm_dist do not match each executable issues an error. In cases where the executable path could not be determined, each executable defers issuing an error until it is required. |