Thread View: comp.lang.scheme.c
1 messages
1 total messages
Started by Robert Marti
Mon, 15 Apr 1991 09:40
Problems with SCOOPS and MIT Scheme 7.0/7.1
Author: Robert Marti
Date: Mon, 15 Apr 1991 09:40
Date: Mon, 15 Apr 1991 09:40
84 lines
2592 bytes
2592 bytes
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 ------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads