[GAP Forum] Writing to File
costanti at science.unitn.it
Sun Apr 18 18:24:51 BST 2004
Dear Bruce and gap-forum,
Scrive "Bruce W. Colletti" <bcolletti at compuserve.com>:
> Re GAP 4.3fix4 running under WinXP Home.
> How do I set the record length of an output text file?
> When printing to the file, numbers follow one another (as desired) until too
> many occur, at which time GAP automatically creates a new output line.
Try something like
AppendToFile := function ( file, s )
otf := OutputTextFile( file, true );
SetPrintFormattingStatus( otf, false );
AppendTo( otf, s );
CloseStream( otf );
Where s is what you want to write in the file
> Numbers are separated by a space or tab.
> LogTo("filename") opens the file...maybe that's the problem. If so, what
> else should I use? I've tried an example in the manual that starts:
> name := Filename(DirectoryTemporary(),"test");
> but GAP gags on the DirectoryTemporary() command.
What do you mean with "gags"?
Try an other directory.
More information about the Forum