Dear GAP Forum,
Jan Draisma asked,
I've seen someone using `gap -p'. This switch seems to be used for
redirecting or reformatting the output, so that an external process
can read it. The details are not clear to me, though. Can anyone help?
The -p option was added for use by the xgap package, and has also been used by
one or two other packages since. It is intended to assist applications that
run GAP via a pipe or pseudo-tty. What it does is to introduce some special
character sequences (beginning with @) in the output from GAP, which indicate,
for instance, the start and end of the `gap>' prompt, or the start and end of
a section of on-line help. These allow xgap to handle help text specially, to
recognise when GAP is ready for input, and so on. The only documentation of
these sequences, at present, is in the source-code of xgap.