axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] overwriting only few funtions in a package.


From: Vanuxem Gregory
Subject: Re: [Axiom-developer] overwriting only few funtions in a package.
Date: Sat, 18 Nov 2006 21:47:24 +0100

Le samedi 18 novembre 2006 à 19:17 +0100, Francois Maltey a écrit :
> Hello, 
> 
> 1/ Can I overwrite only few functions in a package ?
> 
> I want to keep exposed the built-in function 
>   removeSinSq $ TranscendentalManipulations (Integer, Expression Interger)
> and use my own function in my own package :
>   expand $ UsualExpand (Integer, Expression Interger)
> 
> Is it possible ?
> 
> 2/ I put this in my .axiom.input file, but it isn't perfect :
> 
> )cd
> )cd Axiom
> )library USEXPAND
> )set expose add constructor UsualExpand
> )set expose drop constructor TranscendentalManipulations
> 
> In this cas axiom uses the built-in expand. I can't do expand (cos (2*x)).
> 
> Then I reread the init file : )re ../.axiom.input
> And then expand (cos (2*x)) uses the new package.

I forgot how exactly Axiom behaves (my version of Axiom is modified in
some related regards), but try to play with frame. If I remember
correctly when you start Axiom via the axiom script you're working in
the frame 'frame0' (I'm sure of that). But your package is only exposed
in the first frame (via your commands in .axiom.input), try to switch to
the first frame (')frame next') for example. There are some bad
interactions between package exposition and what Axiom caches I think
(reswitch to frame0 and try to call a function from a non exposed
package but already called in the first frame for example).

> If I add a first line expand (cos (a+b)) in the init file, at the first line.
> then it seems that axiom use the new expand.
> 
> But if I add expand (cos (a+b)) at the end of the init file,
> then axiom calls the usual expand of TranscendentalManipulations.

Gni? This is strange, thanks for this information.

> Is it a bug ?

There are a lot...

Hope that helps,

Greg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]