Reflection/List properties: Difference between revisions

no edit summary
m (typing error in PicoLisp)
No edit summary
Line 799:
 
=={{header|PicoLisp}}==
The function <code>methodsshow</code> can be used to print all methodsproperties of an object (only in debug mode):.
 
First we define a rectangle class <code>+Rectangle</code> as subclass of a shape class <code>+Shape</code>:
Line 823:
</lang>
 
Then we can create an object of the +Rectangle class and check its methodsproperties using the <code>methodshow</code> function.
 
<lang>
Line 829:
-> $177356065126400
 
: (methodsshow R)
$177715702441044 (+Rectangle)
-> ((draw> . +Rectangle) (perimeter> . +Rectangle) (area> . +Rectangle) (T . +Rectangle) (move> . +Shape))
dy 20
dx 30
y 0
x 0
-> $177715702441044
</lang>
 
Anonymous user