On Sat, 15 Sep 2001, Chad T. Lower wrote:
<snip>
> Also, if I write a program (function) to do a series of commands, can I l=
> oad or pull up that function on subsequent sessions, or do I need to rety=
> pe it each time I run GAP. Thank you in advance for whatever help you ca=
> n offer.
>
> Chad T. Lower
> a.k.a. Chopper
> http://chadtlower.tripod.com/
<snip>
Chad,
I don't know about your first question concerning user input (you could
use breakpoints like "Error("please assign a value to x")", but I don't
know how safe that is).
About saving your work: You can use an external editor like emacs or
Notepad to type your functions, save them to a file like myfunc.g, and
then invoke
gap> Read("myfunc.g");
That allows you to keep the function over several GAP-sessions, and the
editing is also more comfortable.
If you have already written some function func in GAP, you can save it by
gap> PrintTo("myfunc.g", "func := ", func, ";\n");
This overwrites the previous contents of myfunc.g; use AppendTo if that's
not what you want.
Hope this helps,
Sven.
Sven Reichard
Dept. of Math. Sci.
University of Delaware
reichard@math.udel.edu