Ralf Hemmecke wrote:
> 
> > This should be an FAQ because we have discussed it several times :-)
> >
> > The short answer is that, in all flavours of AXIOM, if you assign to Rep
> > then you are asking for implicit coercions between % and Rep -- and that
> > can lead to unfunny situations as above.
> >
> > The proper way is to define Rep as a constant, i.e. Rep == X.
> 
> Oh, I thought, that just OpenAxiom changed it to using "Rep==X". If I 
> understood correctly, in FriCAS "==" does not mean constant definition 
> but rather "delayed assignment".
> 
>  >grep '^[ \t]*Rep *:=' *|wc -l
> 239
> 
>  >grep '^[ \t]*Rep *==' *
> ffrac.as.pamphlet:  Rep == Record(num : X, den : X) ; -- representation
> herm.as.pamphlet:  Rep ==> Vector R;
> interval.as.pamphlet:  Rep ==> Record(Inf:R, Sup:R);
> newdata.spad.pamphlet:     Rep ==> VTB
> newdata.spad.pamphlet:     Rep ==> A
> newpoly.spad.pamphlet:     Rep ==> List Term
> regset.spad.pamphlet:     Rep ==> LP
> sregset.spad.pamphlet:     Rep ==> LP
> triset.spad.pamphlet:     Rep ==> LP
> triset.spad.pamphlet:     Rep ==> LP
> 
> So in the FriCAS sources, there is only *one* instance with ==. And 
> interestingly, this is not SPAD, but an Aldor program.
> 
> So I assume, in FriCAS, I will rather have to use ==> instead of ==.
> I've tried both, and for ==> as well as for ==, I can do without $X.
> 
> Waldek, what would you suggest?

I would avoid '=='.  Currently when '==' defines function with
no arguments and no mode it is conveted to a macro ('==>').
Given that semantics of '==>' is quite different of _expected_
semantics of '==' this is rather weird irregularity.

-- 
                              Waldek Hebisch
hebi...@math.uni.wroc.pl 

-- 
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 fricas-devel@googlegroups.com.
To unsubscribe from this group, send email to 
fricas-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to