[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Re: coerce to SEX
From: |
William Sit |
Subject: |
Re: [Axiom-developer] Re: coerce to SEX |
Date: |
Fri, 02 Jul 2004 00:21:05 -0400 |
William Sit wrote:
> I cannot coerce a domain into a SExpression, which is needed to call the
> function any from ANY to coerce an object to Any.
>
> SEX::SEX
>
> Cannot convert the type Domain to SExpression for value SExpression()
>
I found two ways to do this:
d:=devaluate(INT)$Lisp
(Integer) Type: SExpression
a:=any(d, 3::None)
3 Type: Integer
obj a
Function Selection for obj
Arguments: ANY
[1] signature: ANY -> NONE
implemented: slot (None)$ from ANY
NONE Type: OutputForm
The second way is simpler:
a:=coerce(3)$ANY1(INT)
What threw me off the track was the very suggestive way to construct an ANY
object using the function any: (SExpression, None)->ANY.
None of the functions exported by SEX, SEXCAT, SEXOF provide any way to input a
SExpression from the interpreter. Typing "(Integer)" (with or without quotes) in
place of the identifier d above will not work.
Is there any documentation for all the Lisp code that can be used in Axiom?
(Lisp is NOT a domain despite the $Lisp notation). Are the commands part of the
Boot language? (this may be a very stupid question).
William