Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
# The Rectangle class
|
||||
(class +Rectangle +Shape)
|
||||
# dx dy
|
||||
|
||||
(dm T (X Y DX DY)
|
||||
(super X Y)
|
||||
(=: dx DX)
|
||||
(=: dy DY) )
|
||||
|
||||
(dm area> ()
|
||||
(* (: dx) (: dy)) )
|
||||
|
||||
(dm perimeter> ()
|
||||
(* 2 (+ (: dx) (: dy))) )
|
||||
|
||||
(dm draw> ()
|
||||
(drawRect (: x) (: y) (: dx) (: dy)) ) # Hypothetical function 'drawRect'
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
: (setq R (new '(+Rectangle) 0 0 30 20))
|
||||
-> $177356065126400
|
||||
|
||||
: (methods R)
|
||||
-> ((draw> . +Rectangle) (perimeter> . +Rectangle) (area> . +Rectangle) (T . +Rectangle) (move> . +Shape))
|
||||
Loading…
Add table
Add a link
Reference in a new issue