Johannes Grabmeier wrote:
> 
> following strange and not desired effect: 
> 
> 1. Compiling a package NCFLOAT with parameter R: Ring
> 2. using it with a concrete ring, here Float
> 3. change the behaviour of Float (outputFixed 2)
> 4. recompile the package
> 5. Side effect: the behaviour of Float is changed back again to original 
> default, not only in calling NCFLOAT, but even for all Float's in the 
> workspace 
> I see no reasonable explanation or even justification for this behaviour.
>

AFAICS:

1) outputFixed 2 sets variables belonging to Float
2) variables belonging to a domain are treated like parameteres,
   in particular are re-initialized when domain is re-initialized
3) re-compiling a domain causes re-initialization of all domains

Re-initialization of domain D is needed in case when D uses
re-compiled domain, in order to pick up changed function definitions.
Because we do not track dependencies between domains we force
re-initialization of all of them.  2) is for simplicity -- it would
be awkward to try to preserve valuses of variables.  1) is natural,
since outputFixed should have lasting effect it must set some
variables.  It is natural to set variables belonging to Float
(as opposed to using Lisp variables).

I agree that this behaviour looks undesirable, but I am not
sure how to specify a different behaviour that is consistent
and possible to implement (I do not see how to avoid loosing
some variables, and once we lost some consistency requires
that we loose all).

-- 
                              Waldek Hebisch
[email protected] 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to