How do I obtain an object's properties?



"ratp" certainly works in this case.  But is there a more general
formulation, which will list all properties of an object which have
been specifically added to it?  So for my example variable a, I'm not
interested that it's prime, even, and integer etc, but only in the
properties I've given it.

Thanks,
Alasdair

On Thu, Sep 10, 2009 at 9:49 AM, Barton Willis<willisb at unk.edu> wrote:
> Does ratp do what you want?
>
> (%i2) (modulus:97, a:rat(2), b:2)$
>
> (%i5) map('ratp,[a,b,a^10,b^10]);
> (%o5) [true,false,true,false]
>
> Barton
>
> -----maxima-bounces at math.utexas.edu wrote: -----
>
>>To:?maxima?list?<maxima at math.utexas.edu>
>>From:?Alasdair?McAndrew?<amca01 at gmail.com>
>>Sent?by:?maxima-bounces at math.utexas.edu
>>Date:?09/09/2009?06:41PM
>>Subject:?[Maxima]?How?do?I?obtain?an?object's?properties?
>>
>>For?example:
>>
>>(%i1)?modulus:97;
>>(\%o1)?????????????????????97
>>(%i2)?a:rat(2);
>>(\%o2)???????????????????????2
>>(%i3)?b:2;
>>(\%o3)???????????????????????2
>>(%i4)?a^10;
>>(\%o4)????????????????????-43
>>(%i5)?b^10;
>>(\%o5)?????????????????1024
>>
>>Here?a?and?b?are?clearly?different?types?of?objects,?even?though?they
>>look?the?same.??How?can?Maxima?tell?me?their?properties?-?and?is?there
>>a?way?to?have?those?properties?automatically?shown?
>>
>>Thanks,
>>Alasdair
>>_______________________________________________
>>Maxima?mailing?list
>>Maxima at math.utexas.edu
>>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>



-- 
Blog: http://amca01.wordpress.com
Web:  http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alasdair.mcandrew