Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,22 @@
(defstruct shape ()
(pos-x 0.0) (pos-y 0.0))
(defstruct circle (shape)
radius)
(defstruct ellipse (shape)
min-radius maj-radius)
(defvarl shapes (list (new circle radius 3.0)
(new ellipse min-radius 4.0 maj-radius 5.0)))
(put-line "original shapes:")
(prinl shapes)
(file-put "shapes.tl" shapes)
(put-line "dump of shapes.tl file:")
(put-line (file-get-string "shapes.tl"))
(put-line "object list read from file:")
(prinl (file-get "shapes.tl"))

View file

@ -0,0 +1,13 @@
(defstruct shape ()
(pos-x 0.0) (pos-y 0.0))
(defstruct circle (shape)
radius
(:method print (me stream pretty-p)
(if pretty-p
(put-string `#<circle of radius @{me.radius} at coordinates (@{me.pos-x}, @{me.pos-y})>`)
:)))
(let ((circ (new circle radius 5.3)))
(prinl circ) ;; print machine readably
(pprinl circ)) ;; print pretty