Dear Mattew,
IsBound(q) would do just what you need.
Best,
Dmitrii

2009/7/31 Matthew Fayers <m.fay...@qmul.ac.uk>:
> Dear forum,
>
> I have a custom package containing lots of functions that I use frequently, 
> that I usually read into GAP at the start of every session.  Since I 
> frequently use polynomials in one variable, one of the first lines of this 
> package is
>
> q:=Indeterminate(Rationals,"q");
>
> The trouble is, if I modify the package and then re-read it into the session, 
> GAP reads the line above again and assigns two indeterminates, both called q. 
>  This causes problems for functions that refer to q.
>
> Is there a way around this, apart from closing a re-opening GAP every time I 
> update my package?  For example, is there a way to modify the above line so 
> that it says something like "if q is not already assigned, let it be an 
> indeterminate"?
>
> Matt.
>
> _____________________________________________________________________________________________
> Matthew Fayers
> School of Mathematical Sciences
> Queen Mary, University of London
> Mile End Road
> London E1 4NS
> 020 7882 5479
>
> _______________________________________________
> Forum mailing list
> Forum@mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>

_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to