marti@inf.ethz.ch (Robert Marti) (04/15/91)
I ftp'd the source of SCOOPS from altdorf.ai.mit.edu in directory
archive/scheme-library/unsupported/CScheme. Unfortunately, I don't
seem to be able to get it up and running properly. Since I am not
an expert in most of the non-standard stuff used in the implementation
of the SCOOPS package (environments, macros etc.) I'd appreciate some
help from the experts Following is a shortened and adapted example
which came with MacScheme+Toolsmith 1.51.
Thanks in advance
Robert Marti | Phone: +41 1 254 72 60
Institut fur Informationssysteme | FAX: +41 1 262 39 73
ETH-Zentrum | E-Mail: marti@inf.ethz.ch
CH-8092 Zurich, Switzerland |
----- Begin Included Stuff -----
Scheme saved on Monday December 10, 1990 at 9:55:37 PM
Release 7.1.0 (beta)
Microcode 11.59
Runtime 14.104
1 ]=> (load "scoops.scm")
Loading "scoops.scm" -- done
;No value
1 ]=>
(define-class location
(classvars (w 'baker)(u 'able))
(instvars (x 400)
(y 500))
(options settable-variables gettable-variables inittable-variables))
;Value: #[SCOOPS Class 3]
1 ]=>
(define-method (location move) (deltax deltay)
(set! x (+ x deltax))
(set! y (+ y deltay)))
;Value: move
1 ]=>
(define-class chair
(mixins location)
(instvars (number-of-legs 4)(material 'metal))
(options (settable-variables number-of-legs)
gettable-variables
inittable-variables)))
;Value: #[SCOOPS Class 5]
1 ]=> (define ch1 (make-instance chair 'x 500 'y 500))
;Value: ch1
1 ]=> (class-of-object ch1)
;Value: chair
1 ]=> (describe chair)
CLASS DESCRIPTION
==================
NAME : chair
CLASS VARS : (u w)
INSTANCE VARS : (y x number-of-legs material)
METHODS : (set-y set-x set-u set-w get-y get-x get-u get-w move get-number-of-legs get-material set-number-of-legs)
MIXINS : (location)
CLASS COMPILED : #T
CLASS INHERITED : #T
;No value
1 ]=> (send ch1 set-y 500)
Unbound variable set-y
2 Error->
------ End Included Stuff ------