axiom-developer
[Top][All Lists]
Advanced

[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:52:18 +0200
User-agent: Thunderbird 1.5 (X11/20051201)

And here an addon to my last mail that explains why I think Axiom should not show

  0: () -> %

where I define

  0: %

I am sure you can read that.

Ralf
---------------------------------------------------------------------

#include "aldor"
NTBA(T: OutputType with {0: %}): OutputType with {
   0: %;
   0: () -> %;
}  == add {
   Rep == List T;
   import from T, List T;
   0: % == per empty;
   0(): % == per [0]; -- identical to "per [0$T];".
   (tw: TextWriter) << (x: %): TextWriter == tw << rep x;
}

main(): () == {
        import from TextWriter, Character, String;
        import from NTBA Integer;
        stdout << "0   = " << 0   << newline;
        stdout << "0() = " << 0() << newline;
}

main();

#if OUTPUT
woodpecker:~/scratch>aldor -grun -laldor ntba.as
0   = []
0() = [0]
#endif




reply via email to

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