Hi Waldek:
Thanks. That is exactly what I want. Good solution. So the
"trick" is to use ' instead of the string. So is the
following a bug?
a:='Fraction::SEX
Fraction Type:SExpression
b:="Fraction"::SEX
Fraction Type:SExpression
(a=b)@Boolean
false Type Boolean
That is, I was deceived by the output which looked the same.
Perhaps the output should have been ('Fraction) and
("Fraction") ??
Also,
destruct(a) or destruct(b) leads to an Error:
Function Selection for destruct
Arguments: SEX
[1] signature: SEX -> LIST SEX
implemented: slot (List $)$ from SEX
>> Error detected within library code:
Non-list
protected-symbol-warn called with (NIL)
William
Waldek Hebisch wrote:
William Sit wrote:
Gabriel:
Thanks for the response. Your script shows how to get the
parameters, not the constructor. I do not have OpenAxiom
installed (sorry). The question is whether I can test that
the constructor is Fraction, or otherwise (like
FiniteField) when the domain belongs to the category
Field.
Do you want something like this?
(10) -> a := Fraction(Integer)
(10) Fraction Integer
Type: Domain
(11) -> (opOf(devaluate(a)$Lisp)$Lisp = 'Fraction::SEX)@Boolean
(11) true
Type: Boolean
(12) -> (opOf(devaluate(a)$Lisp)$Lisp = 'FiniteField::SEX)@Boolean
(12) false
Type: Boolean
(13) -> a :=FiniteField(5,2)
(13) FiniteField(5,2)
Type: Domain
(14) -> (opOf(devaluate(a)$Lisp)$Lisp = 'Fraction::SEX)@Boolean
(14) false
Type: Boolean
(15) -> (opOf(devaluate(a)$Lisp)$Lisp = 'FiniteField::SEX)@Boolean
(15) true
Type: Boolean
--
Waldek Hebisch
address@hidden
_______________________________________________
Axiom-developer mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-developer