instance_vars (instance|class)
An array of all instance variables defined for the given instance or class. If an instance is queried, then the values of all instance variables for that instance are also reported.
![]() | This example is based on the class and method developed in method, class_add_ivar and class_add_cvar. |
Gamma> polyD; {RegPolygon (length) (sides)} Gamma> sqB; {Square (length) (sides . 4)} Gamma> instance_vars(RegPolygon); [length sides] Gamma> instance_vars(polyD); [(length) (sides)] Gamma> instance_vars(Square); [length (sides . 4)] Gamma> instance_vars(sqB); [(length) (sides . 4)] Gamma>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.