class_name
class_name — gives the name of the class.
class_name (class|instance)
class|instanceA class or instance of a class.
The name of the class, as a symbol.
![]() | |
This example is based on the class and method developed in |
Gamma>y = Square;(defclass Square RegPolygon [(area .(defun Square.area (self) (sqr (@ self length))))][length (sides . 4)])Gamma>class_name(y);SquareGamma>box = new(Square);{Square (length) (sides . 4)}Gamma>class_name(box);SquareGamma>