Dear Forum, Dear Luca Giuzzi,

> I would like to replace a function defined by
> DeclareGlobalFunction/InstallGlobalFunction
> Unfortunately, the object installed by InstallGlobalFunction is read-only, and
> Unbind also fails.
> Is there any way to mark the object as replaceable?

Assuming you know what you are doing (replacing some functions can lead to 
weird errors),
MakeReadWriteGlobal("TheFunction");
(note: String, not variable!) will remove write protection from 
TheFunction
and allow you to overwrite it.
MakeReadOnlyGlobal is the inverse operation.

If the issue is simply with reading in a file, using

Reread

instead of 

Read

will allow a second call to `InstallGlobalFunction' to overwrite the first 
instance.

Best wishes,

   Alexander Hulpke

-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hul...@math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke




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

Reply via email to