[GAP Forum] query
Justin C. Walker
justin at mac.com
Mon Oct 15 17:59:18 BST 2007
Dear Forum,
On Oct 14, 2007, at 6:38 AM, arun muktibodh wrote:
> I am new to GAP. I have GAP4 installed on
> my pc (Windows). Could anybody please suggest how to
> create, save and reload a file ?
After answering Arun's query, I started poking around in the
documentation, and ran across a minor doc glitch, viz:
Section 9.7 (on-line and my 4.4.10 version) gives an example of the
use of ReadAsFunction() that does not match its current behavior.
Given the file /tmp/Foo.g, containing code, the call as documented in
this section appears to execute the code directly, while in fact, the
call causes the code in the file to be "wrapped", as if declared
something like
F := function()
... # lines from the file
end;;
The example should then be something like
==========================================
gap> a := 1;
1
gap> F1:=ReadAsFunction("/tmp/example.g");
function( ) ... end
gap> F1();
100
gap> a;
1
==========================================
In addition, it's not clear from the description that you need to
treat ReadAsFunction() as a function (that returns a function body
(with no formal arguments)).
Unless, of course, I've missed something along the way, in which
case, please correct my misstatements.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income
--------
Experience is what you get
when you don't get what you want.
--------
More information about the Forum
mailing list