Note that GAP for MS-DOS will use up to 128 MByte of extended memory (using XMS, VDISK memory allocation strategies) or up to 128 MByte of expanded memory (using VCPI programs, such as QEMM and 386MAX) and up to 128 MByte of disk space for swapping.
If you hit ctr-C
the DOS extender (go32
) catches it and aborts
GAP immediately. The keys ctr-Z
and alt-C
can be used instead
to interrupt GAP.
The arrow keys left, right, up, down, home, end, and delete can be used for command line editing with their intuitive meaning.
Pathnames may be given inside GAP using either slash (/
) or
backslash (\
) as a separator (though \
must be escaped in strings of
course).
When you start GAP 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.
GAP for MS-DOS accepts the following (lowercase) options.
-g
The 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 libname
The option -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
file libname\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 -l
option.
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 -l "lib\;\usr\local\lib\gap3r4p4\lib\"
GAP will search for a library file first in the subdirectory lib\
of
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 .grp
, and
which contain the groups initially known to GAP, in the directory one
gets by replacing the string lib
in libname by the string grp
. If
you do not want to put the group directory grp\
in the same directory
as the lib\
directory, for example if you want to put the groups onto
another hard disk partition, you have to edit the assignment in
libname\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 grp\
.
Similar considerations apply to the character table files. Those
filenames end in .tbl
. GAP looks for those files in the directory
given by TBLNAME
. The default value for TBLNAME
is obtained by
replacing lib
in libname with tbl
.
-h docname
The option -h
tells GAP that the on-line documentation for GAP is
in the directory docname. Per default docname is obtained by
replacing 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
following warning
help: hmm, I cannot open the table of contents file 'doc\manual.toc' maybe you should use the option '-h <docname>'?
-m memory
The option -m
tells GAP to allocate memory bytes at startup time.
If the last character of memory is k
or K
it is taken in KBytes and
if the last character is m
or M
memory is taken in MBytes.
GAP for MS-DOS will by default allocate 4 MBytes of memory. If you
specify -m memory
GAP will only allocate that much memory. The
amount of memory should be large enough so that computations do not
require too many garbage collections. On the other hand if GAP
allocates more virtual memory than is physically available it will spend
most of the time paging.
-n
The options -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 IBM PC compatibles.
-b
The option -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
The option -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.
-x length
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.
-y length
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
should display -- <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.
-z freq
GAP for MS-DOS checks in regular intervals whether the user has
entered ctr-Z
or alt-C
to interrupt an ongoing computation.
Under MS-DOS 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
will abort.
When you start GAP, it looks for the file with the name gap.rc
in
your homedirectory (i.e., the directory defined by the environment
variable HOME
). If such a file is found it is read after
libname\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;
GAP 3.4.4