Dear Gap Forum,
To be able to call an external executable, it's necessary to write
information to a file. As far as I know, GAP offers the functions
PrintTo and AppendTo. These functions both open a file, write the
information and close it again (am I right?) So when the function
AppendTo is used within a loop, writing in each cycle a small amount
of information, the file is opened and closed again very often,
consuming a huge amount of time.
Is there a way to open a file once, write all the information using
a loop, and close it again?
I have thought of using strings. First, all the information is stored
in a string (using Concatenation), after which the whole string is
written to a file using PrintTo. It turns out that, at least when
working under DOS, this is even slower than the first option.
Erik Roijackers / Gap Students