Johannes Grabmeier <[email protected]> writes:

| I need Any for convenient use of different variable domains in a database
| prototype. This, however, causes problems, as equality semantics not
| transparent for me: Can anybody explain or/and give a way around. E.g. 
counting
| all occurencies "A" (of type String realized as Any) in a Table(Integer, Any)
| does not work, as the system considers each occurency "A" as a new object.
| 
| Here some illustrations:

Many explanations of the behaviour you saw were given.  However, with the
current SVN version of OpenAxiom, I got the result you were expecting.
See the transcript below.

-- Gaby


Starts dribbling to any.txt (2009/6/14, 8:9:9).
(1) -> )r test-any
ai : IndexedString(10) := char "A"
 

   (1)  "A"
                                                       Type: IndexedString 10

bi : IndexedString(10) := char "A"
 

   (2)  "A"
                                                       Type: IndexedString 10

(ai = bi)@Boolean
 

   (3)  true
                                                                Type: Boolean

a : String := "A"
 

   (4)  "A"
                                                                 Type: String

b : String := "A"
 

   (5)  "A"
                                                                 Type: String

(a = b)@Boolean
 

   (6)  true
                                                                Type: Boolean

aa : Any := "A" :: String
 

   (7)  "A"
                                                                 Type: String

domainOf aa
 

   (8)  String()
                                                             Type: OutputForm

ba : Any := "A" :: String
 

   (9)  "A"
                                                                 Type: String

domainOf ba
 

   (10)  String()
                                                             Type: OutputForm

(aa = ba)@Boolean
 

   (11)  true
                                                                Type: Boolean

aA : Any := a
 

   (12)  "A"
                                                                 Type: String

domainOf aa
 

   (13)  String()
                                                             Type: OutputForm

bA : Any := b
 

   (14)  "A"
                                                                 Type: String

(aA = bA)@Boolean
 

   (15)  true
                                                                Type: Boolean
(16) -> )quit

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to