GAP for TOS will usually allocate all available memory. Note that
GAP for TOS does not support virtual memory, i.e., you can never use
more memory than this default gives you. If you specify
GAP will only allocate that much memory. If you specify a negative
amount, GAP leaves this much memory unallocated. You may want to do
this, so that that it is possible to run other programs from inside
GAP with the
The arrow keys left, right, up, and down can be used for command line editing with their intuitive meaning.
GAP for TOS supports
UNIXMODE, i.e., if the environment variable
UNIXMODE is set to an appropriate value such as
will emulate a UNIX style file system on top of the TOS filesystem. That
is GAP will accept pathnames with the
/ as separator, which it will
automatically map to the TOS separator
\. It will also allow long
filenames (with more than 8+3 characters), which it will automatically
map to TOS filenames and remember the true filenames in a special file
.dir is used to symbolic links, which can be resolved by
GAP (to create then you need the GNU
GAP for TOS runs as an ordinary TOS program. That means that it does not open windows or display a menu bar etc. The advantage of this is that no valuable memory space is wasted for the windows. The disadvantage is that GEM programs with windows are certainly more sexy. A GEM version is being developed, but don't hold your breath.
Apart from this everything works as described in this manual and you should not have any problems using GAP.
When you start GAP on the Atari ST, you may specify a number of
options on the command-line to change the default behaviour of GAP.
All these options start with a hyphen
-, followed by a single letter.
Options must not be grouped, e.g.,
gap -gq is illegal, use
gap -g -q
instead. Some options require an argument, this must follow the option
and must be separated by a space, e.g.,
gap -m 256k, it is not
correct to say
gap -m256k instead.
You must declare GAP as TOS-takes-parameter program if you want to
specify command-line options when you start GAP by double clicking.
This means that the name of the GAP program file must be
When you start GAP from a shell, such as
gulam.tos, the name of the
program file does not matter. GAP for TOS, unlike the UNIX versions,
does not distinguish upper and lower case for options.
GAP for TOS accepts the following (lowercase) options.
-g tells GAP to print a information message every time a
garbage collection is performed.
#G collect garbage, 1931 used, 5012 dead, 912 KB free, 3072 KB total
For example, this tells you that there are 1931 live objects that survived a garbage collection, that 5012 unused objects were reclaimed by it, and that 912 KByte of totally allocated 3072 KBytes are available afterwards.
-l tells GAP that the library of GAP functions is in
the directory libname. Per default libname is
lib/, i.e., the
library is normally expected in the subdirectory
lib/ of the current
directory. GAP searches for the library files, whose filenames end in
.g, and which contain the functions initially known to GAP, in this
directory. libname should end with a pathname separator, i.e.,
but GAP will silently add one if it is missing. GAP will read the
\init.g during startup. If GAP cannot find this file
it will print the following warning
gap: hmm, I cannot find 'lib\init.g', maybe use option '-l <lib>'?
If you want a bare bones GAP, i.e., if you do not need any library
functions, you may ignore this warning, otherwise you should leave GAP
and start it again, specifying the correct library path using the
It is also possible to specify several alternative library paths by
separating them with semicolons
;. Note that in this case all path
names must end with the pathname separator
\. GAP will then search
for its library files in all those directories in turn, reading the first
it finds. E.g., if you specify
GAP will search for a library file first in the subdirectory
the current directory, and if it does not find it there in the directory
\usr\local\lib\gap3r4p4\lib\. This way you can built your own directory
of GAP library files that override the standard ones.
GAP searches for the group files, whose filenames end in
which contain the groups initially known to GAP, in the directory one
gets by replacing the string
lib in libname by the string
you do not want to put the group directory
grp\ in the same directory
lib\ directory, for example if you want to put the groups onto
another hard disk partition, you have to edit the assignment in
\init.g that reads
GRPNAME := ReplacedString( LIBNAME, "lib", "grp" );
This path can also consist of several alternative paths, just as the
library path. If the library path consists of several alternative paths
the default value for this path will consist of the same paths, where in
each component the last occurrence of
lib\ is replaced by
Similar considerations apply to the character table files. Those
filenames end in
.tbl. GAP looks for those files in the directory
TBLNAME. The default value for
TBLNAME is obtained by
lib in libname with
-h tells GAP that the on-line documentation for GAP is
in the directory docname. Per default docname is obtained by
lib in libname with
doc. docname should end with a
pathname separator, i.e.,
\, but GAP will silently add one if it is
missing. GAP will read the file docname
\manual.toc when you first
use the help system. If GAP cannot find this file it will print the
help: hmm, I cannot open the table of contents file 'doc\manual.toc' maybe you should use the option '-h <docname>'?
-m tells GAP to allocate memory bytes at startup time.
If the last character of memory is
K it is taken in KBytes and
if the last character is
M memory is taken in MBytes.
GAP for TOS will by default allocate all available memory. If you
-m memory GAP will only allocate that much memory, unless
memory is larger than the default, in that case GAP will fail. If
you specify a negative amount GAP leaves that much memory unallocated.
You may want to do this so that it is possible to run other programs from
inside GAP with the
Exec command, for example
gap -m -256k will
leave 256 KByte unallocated, enough to run MicroEMACS from inside GAP.
-n tells GAP to disable the line editing and history
(see Line Editing).
There does not seem to be a good reason to do this on an Atari ST.
-b tells GAP to suppress the banner. That means that
GAP immediately prints the prompt. This is useful when you get tired
of the banner after a while.
-q tells GAP to be quiet. This means that GAP does
not display the banner and the prompts
gap. This is useful if you
want to run GAP as a filter with input and output redirection and want
to avoid the the banner and the prompts clobber the output file.
With this option you can tell GAP how long lines are. GAP uses this value to decide when to split long lines.
The default value is 80, which is correct if you start GAP from the
desktop or one of the usual shells. However, if you start GAP from a
window shell such as
gemini, you may want to decrease this value. If
you have a larger monitor, or use a smaller font, or redirect the output
to a printer, you may want to increase this value.
With this option you can tell GAP how many lines your screen has.
GAP uses this value to decide after how many lines of on-line help it
-- <space> for more --.
The default value is 24, which is the right value if you start GAP
from the desktop or one of the usual shells. However, if you start
GAP from a window shell such as
gemini, you may want to decrease
this value. If you have a larger monitor, or use a smaller font, or
redirect the output to a printer, you may want to increase this value.
GAP for TOS checks in regular intervals whether the user has entered
Z or alt-
C to interrupt an ongoing computation. Under TOS
this requires reading the keyboard status (UNIX on the other hand will
deliver a signal to GAP when the user entered ctr-
C), which is
rather expensive. Therefor GAP only reads the keyboard status every
freq-th time. The default is 20. With the option
-z this value can
be changed. Lower values make GAP more responsive to interrupts,
higher values make GAP a little bit faster.
Further arguments are taken as filenames of files that are read by GAP
during startup, after libname
\init.g is read, but before the first
prompt is printed. The files are read in the order in that they appear
on the command line. GAP only accepts 14 filenames on the command
line. If a file cannot be opened GAP will print an error message and
When you start GAP, it looks for the file with the name
your homedirectory (i.e., the directory defined by the environment
HOME). If such a file is found it is read after
\init.g, but before any of the files mentioned on the command
line are read. You can use this file for your private customizations.
For example, if you have a file containing functions or data that you
always need, you could read this from
gap.rc. Or if you find some of
the names in the library too long, you could define abbreviations for
those names in
gap.rc. The following sample
gap.rc file does both.
Read("c:\\gap\\dat\\mygroups.grp"); Op := Operation; OpHom := OperationHomomorphism; RepOp := RepresentativeOperation; RepsOp := RepresentativesOperation;
Previous Up Top Next