[Aldor-l] LabelSpecies for L: LabelType -> CombinatorialSpecies L
Martin Rubey
martin.rubey at univie.ac.at
Mon Oct 23 03:47:16 EDT 2006
Ralf Hemmecke <ralf at hemmecke.de> writes:
> On 10/22/2006 07:54 PM, Martin Rubey wrote:
> > Dear all,
> > is there a way to check whether two constants are identical. I.e., I'd like
> > to have
> > foo(A: SomeCat, B: SomeCat): Boolean
> > return true, if A and B are identical, false otherwise. In Axiom, we have
> > "is" for that purpose, but it seems that "is" does not work in Aldor.
>
> Right. "is" is only reserved but not defined.
>
> What about
>
> (A pretend Pointer) = (B pretend Pointer)
>
> ?
>
> Isn't that what "identical" means?
Thanks, yes, that appears to work. At first, I also thought that this would be
it, but I was discouraged by
-------------------------------------------------------------------------------
rubey at aquin:~$ aldor -gloop
AA L DDDD OOO RRRR
A A L D D O O R R
A A L D D O O R R
AAAAA L D D O O RRRR
A A L D D O O R R
A A LLLLL DDDD OOO R R
(c) Numerical Algorithms Group Ltd 1995-2001
Release: Aldor(C) version 1.0.3 for LINUX(glibc2.3)
Type "#int help" for more details.
%1 >> #include "aldor"
Comp: 80 msec, Interp: 10 msec
%2 >> #include "aldorinterp"
Comp: 40 msec, Interp: 0 msec
%3 >> import from MachineInteger, Pointer
Comp: 10 msec, Interp: 0 msec
%4 >> MachineInteger pretend Pointer
0x854b940 @ Pointer
Comp: 0 msec, Interp: 100 msec
%5 >> MachineInteger pretend Pointer
0x85879c0 @ Pointer
Comp: 0 msec, Interp: 0 msec
%6 >> MachineInteger pretend Pointer
0x8587d20 @ Pointer
-------------------------------------------------------------------------------
In compiled code, it works, though.
Martin
More information about the Aldor-l
mailing list