Bill Page wrote:
>
> Any does not export a comparison, but there is not a problem if we use
> inequalities. E.g.
>
> (1) -> a:Any:="x"
>
> (1) "x"
> Type: String
> (2) -> b:Any:="x"
>
> (2) "x"
> Type: String
> (3) -> (a<=b and a>=b)
>
> (3) true
> Type: Boolean
> (4) ->
>
> Apparently the reason that the compound inequality works is because
> the AnyFunctions1 package exposes a 'retract' function and the
> interpreter is smart enough to use it as part of it's function
> selection algorithms.
>
> So if we simply remove the definition of = from Any as in the patch below:
<snip>
> then we can get the expected result from the interpreter:
>
> (1) -> )co any.spad
> Compiling FriCAS source code from file /home/wspage/any.spad using
> old system compiler.
> ANY abbreviates domain Any
>
> (1) -> a:Any:="x"
>
> (1) "x"
> Type: String
> (2) -> b:Any:="x"
>
> (2) "x"
> Type: String
> (3) -> c:Any:="y"
>
> (3) "y"
> Type: String
> (4) -> (a=b)@Boolean
>
> (4) true
> Type: Boolean
> (5) -> (a=c)@Boolean
>
> (5) false
> Type: Boolean
>
I think that Johannes wants to use equality in Spad code --
removing equality from Any does not help with this...
--
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
-~----------~----~----~----~------~----~------~--~---