After downloading the Windows version of the GAP system, I want to ask if GAP can read the file in specified path in Windows? What is the command to load a GAP script in the Windows environment?
Asked
Active
Viewed 1,740 times
1 Answers
3
The command is called Read
(enter ?Read
in GAP to see the documentation). The trick on Windows is to replace \
by /
. For example one should call
gap> Read("C:/Users/myname/gap/program.g");
to read a file that Windows would call
C:\Users\myname\gap\program.g
Also, I'd recommend to avoid paths containing spaces.
P.S. If you prefer to ask questions about GAP in StackExchange framework, I'd recommend to try to ask them at the Mathematics Q&A site.

Mike Pierce
- 1,390
- 1
- 12
- 35

Olexandr Konovalov
- 534
- 4
- 23
-
2Another caveat under Windows is about creating a text file with an editor which automatically adds ".txt" extension to the file name, when Windows Explorer hides extensions for standard file types. Then `program.g` may be actually `program.g.txt`, but that wouldn't be obvious. – Olexandr Konovalov Jul 28 '13 at 19:41