[GAP Forum] query

Alexander Konovalov alexander.konovalov at gmail.com
Wed Oct 31 17:45:21 GMT 2007


Dear Arun,

>           I am still in trouble and cant do the basic
> things. I have tried all the commands from the manual.
>       I have two basic questions.
>
> I am working with GAP installed on my pc with
> Windows-2000. I am working on RXVT.

Thanks for the relevant details, this helps to answer.

> 1) If I have written a program of say 10 lines and I
> want to cut the last 5 lines so that I start working
> again from 5th line. How to do this ?

1) In your text editor select the text that you would
like to paste into RXVT window
2) Press Ctrl-C to copy it to the buffer
3) Click with the mouse on the RXVT window to activate it
4) Press Shift-Ins to insert the text

> 2) Suppose I save the program with;
>
>   gap> SaveWorkspace("asm.g");
>      true
>   gap> quit;
>
>     I again start a new session with;
>   gap> Read("asm.g");
>      starts infinite loop with number of errors.
>
> Even by putting complete path my file asm.g would not
> open.
>       I will highly appreciate your help.

This is a mix of two things - workspaces to save a ``snapshot''
of current GAP workspace in a file, and text files with programs
written in GAP.

What you really need is to:
1) Open some text editor (e.g. Windows Notepad)
2) Enter the text of your GAP program
3) Save the file, e.g. with the name "myprog.g" (be careful - Windows
notepad may automatically save is as "myprog.g.txt". Let us assume that
this file is in "C:\mygap" folder.
4) in GAP, enter the command Read("C:/mygap/myprog.g");
(note the slash "/" after C:, not backslash).
This will read your code into the GAP session.

To see how workspaces work, type ?SaveWorkspace in the command line.
In particular, Read will never be able to read workspace created with
SaveWorkspace and having special format.

Hope this helps!

Best wishes,
Alexander



More information about the Forum mailing list