Gap script: `QUIT;` vs `quit;`.

11 views
Skip to first unread message

hongy...@gmail.com

unread,
May 1, 2022, 9:31:10 AMMay 1
to
On Ubuntu 20.04.3 LTS, I use gap [1] (GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra) to run the following script:

$ cat gap-test.g
Display(SmallGroup(8,1));
QUIT;

$ gap gap-test.g
┌───────┐ GAP 4.12dev-1280-g6feeb8c built on 2022-04-25 14:24:55+0800
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv8
Configuration: gmp 6.2.0, GASMAN, readline
Loading the library and packages ...
Packages: AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.2, AutoDoc 2022.03.10,
AutPGrp 1.10.2, Browse 1.8.14, CaratInterface 2.3.3, CRISP 1.4.5,
Cryst 4.1.24, CrystCat 1.1.9, CTblLib 1.3.3, FactInt 1.6.3,
FGA 1.4.0, Forms 1.2.7, GAPDoc 1.6.5, genss 1.6.6, IO 4.7.2,
IRREDSOL 1.4.3, LAGUNA 3.9.4, orb 4.8.4, Polenta 1.3.10,
Polycyclic 2.16, PrimGrp 3.4.1, RadiRoot 2.9, recog 1.3.2,
ResClasses 4.7.2, SmallGrp 1.5, Sophus 1.25, SpinSym 1.5.2,
TomLib 1.2.9, TransGrp 3.6.1, utils 0.72
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
pc-group with 3 pc-generators and relations:
g1^2 = g2
g2^2 = g3
g3^2 = id
all generators commute, the groups is abelian
$

If I change the script into the following, i.e., use `quit;` as the last command:

$ cat gap-test.g
Display(SmallGroup(8,1));
quit;

In this case, the test result is as follows:

$ gap gap-test.g
┌───────┐ GAP 4.12dev-1280-g6feeb8c built on 2022-04-25 14:24:55+0800
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv8
Configuration: gmp 6.2.0, GASMAN, readline
Loading the library and packages ...
Packages: AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.2, AutoDoc 2022.03.10,
AutPGrp 1.10.2, Browse 1.8.14, CaratInterface 2.3.3, CRISP 1.4.5,
Cryst 4.1.24, CrystCat 1.1.9, CTblLib 1.3.3, FactInt 1.6.3,
FGA 1.4.0, Forms 1.2.7, GAPDoc 1.6.5, genss 1.6.6, IO 4.7.2,
IRREDSOL 1.4.3, LAGUNA 3.9.4, orb 4.8.4, Polenta 1.3.10,
Polycyclic 2.16, PrimGrp 3.4.1, RadiRoot 2.9, recog 1.3.2,
ResClasses 4.7.2, SmallGrp 1.5, Sophus 1.25, SpinSym 1.5.2,
TomLib 1.2.9, TransGrp 3.6.1, utils 0.72
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
pc-group with 3 pc-generators and relations:
g1^2 = g2
g2^2 = g3
g3^2 = id
all generators commute, the groups is abelian
Reading file "gap-test.g" has been aborted.
gap>

As you can see, gap doesn't quit its running process even after all the commands have been completed. I'm very confused on this behavior. Any hints will be highly appreciated.

[1] https://www.gap-system.org/

Regards,
HZ

Lew Pitcher

unread,
May 1, 2022, 9:59:16 AMMay 1
to
On Sun, 01 May 2022 06:31:07 -0700, hongy...@gmail.com wrote:

> On Ubuntu 20.04.3 LTS, I use gap [1] (GAP - Groups, Algorithms,
> Programming - a System for Computational Discrete Algebra) to run the
> following script:
[snip]
> As you can see, gap doesn't quit its running process even after all the
> commands have been completed. I'm very confused on this behavior. Any
> hints will be highly appreciated.
>
> [1] https://www.gap-system.org/


I suggest checking out the FAQ at https://www.gap-system.org/Faq/faq.html
and the documentation at https://www.gap-system.org/Doc/doc.html

If you still have problems, try using the contacts at
https://www.gap-system.org/Contacts/contacts.html


--
Lew Pitcher
"In Skills, We Trust"

hongy...@gmail.com

unread,
May 1, 2022, 10:14:58 AMMay 1
to
Thank you. I understand the difference between them:

1. quit

type 'quit;' to quit to outer loop

2. In manual, the following description is used:

6.7.1
QUIT
. QUIT
(global variable)
An emergency way to leave GAP is to enter QUIT at any gap> or brk> or
brk_nn > prompt.

Regards,
HZ

Lew Pitcher

unread,
May 1, 2022, 10:22:58 AMMay 1
to
On Sun, 01 May 2022 07:14:55 -0700, hongy...@gmail.com wrote:

> On Sunday, May 1, 2022 at 9:59:16 PM UTC+8, Lew Pitcher wrote:
>> On Sun, 01 May 2022 06:31:07 -0700, hongy...@gmail.com wrote:
>>
>> > On Ubuntu 20.04.3 LTS, I use gap [1] (GAP - Groups, Algorithms,
>> > Programming - a System for Computational Discrete Algebra) to run the
>> > following script:
>> [snip]
>> > As you can see, gap doesn't quit its running process even after all
>> > the commands have been completed. I'm very confused on this behavior.
>> > Any hints will be highly appreciated.
>> >
>> > [1] https://www.gap-system.org/
>> I suggest checking out the FAQ at
>> https://www.gap-system.org/Faq/faq.html and the documentation at
>> https://www.gap-system.org/Doc/doc.html
>>
>> If you still have problems, try using the contacts at
>> https://www.gap-system.org/Contacts/contacts.html
>
> Thank you. I understand the difference between them:

Apparently, you don't "understand the difference between" QUIT and quit.

And, you certainly don't understand the scope of the help you can
get in comp.unix.shell. Your question has nothing to do with
the unix shell, and, if you need clarification on the differences
between commands that a specific application supports, you should
find a forum that discusses /that application/, or use /that
application's/ FAQ/documentation/contacts.

-- 30 --
Reply all
Reply to author
Forward
0 new messages