[GAP Forum] Running GAP commnads from a file

Dmitrii (Dima) Pasechnik dima at ntu.edu.sg
Thu Dec 27 03:21:18 GMT 2012


Dear all,

On 27 December 2012 06:28, GARY LOMP <glomp at optonline.net<mailto:glomp at optonline.net>> wrote:
I created the following file

A:=Factorial( 10 );
B:=Factorial( 20 );

I can read it in (now that I have been advised that windows hides the
extension .txt on my file, which is test_gap.g) IMO, this is nothing
short of pure confusion, but that's Microsoft for you.

There is no error message. I would expect the variables A and B to be
defined since the "manual" says the file is read and executed. But they
are not.
Do you mean to say that after Read(); you evaluate A at the GAP prompt and don't see
gap> A;
3628800

but see
gap> A;
Variable: 'A' must have a value

If the latter, it looks as if your file actually didn't get read.
Please try to modify your file as follows:

A:=Factorial( 10 );
B:=Factorial( 20 );
Print(A);

Then a successful Read() will also result in 10! being printed.
If this does not happen,
post your GAP version and Windows version (not sure if GAP is tested, or even meant to work, on Windows 8) here.


Best,
Dmitrii


________________________________
CONFIDENTIALITY:This email is intended solely for the person(s) named and may be confidential and/or privileged.If you are not the intended recipient,please delete it,notify us and do not copy,use,or disclose its content.

Towards A Sustainable Earth:Print Only When Necessary.Thank you.


More information about the Forum mailing list