[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Problem with defining Zero
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] Problem with defining Zero |
Date: |
Thu, 13 Apr 2006 21:41:11 +0200 |
User-agent: |
Thunderbird 1.5 (X11/20051201) |
Hello Antoine.
First, in Aldor it is suggested to write
Rep == LPF;
instead of your
Rep ==> LPF;
Second, there is some magic going on here that I cannot explain.
http://wiki.axiom-developer.org/SandBoxZero
Clearly, you specify:
Zero:() -> % ;
in the exports, but nowhere you say something like
0: %
So it should be clear that there is no 0$NTBA.
HOWEVER, why does Axiom )show the signature
0: () -> %
Can somebody explain why Zero and 0 should be the same? I am almost 100%
sure that there is not such syntactic sugar in the Aldor compiler, so I
guess Axiom is treating Zero and 0 identically, **but** not in finding
the implementation. Is that behaviour documented somewhere in Axiom?
How to do it right?
Replace
Zero:() -> % ;
by
0: %;
and
Zero():% == { per [0$FP] }
by
0 :% == { per [0$FP] }
And say
dummy (f:%):% == 0;
The )show will be identical. STRANGE!!! It should show
0: %
instead of
0: () -> %
But
(3) -> 0$NTBA(x,FRAC INT)
(3) D [0]
works.
Ralf