On 6/13/07, Waldek Hebisch wrote:
Martin Rubey rote:

> Waldek, in case you know, could you just provide an example call from
> within the Axiom interpreter?  I tried
>
> getDependentsOfConstructor(Integer)$Lisp
>
> but only nil was returned.
>

>From interpreter you may use:

)lisp (|getDependentsOfConstructor| '|Integer|)

The argument is an unevaluated (because of quote) symbol.  If you want to
call it from Spad you need to use something like:

(getDependentsOfConstructor$Lisp)((INTERN$Lisp)("Integer"))

or maybe use FIND_-SYMBOL insted of INTERN.  I do not know if there
is easier method to pass Lisp symbol from Spad to Lisp function.


Excellent!

Depending on what you know about an object you might
also prefer to use devaluate to get the symbol for example:

(1) -> parentsOf(CAR(devaluate(Integer)$Lisp)$Lisp)$Lisp

  (1)
  (((IntegerNumberSystem) . T) ((ConvertibleTo (String)) . T) ((OpenMath) . T))
                                                  Type: SExpression

Note that on Axiom for Windows 0.1.4 I get the following error:

(2) ->  )lisp (|getDependentsOfConstructor| '|Integer|)

  >> System error:
  Caught fatal error [memory may be damaged]

but I think that may be corrected in wh-sandbox compiled for Windows.
I will test that later.

Regards,
Bill Page.


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to