OSDN Git Service
(root)
/
happyabc
/
happyabc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
34df3896d6373b1dfbbcdd98290f6b85329eb40e
[happyabc/happyabc.git]
/
example
/
slot_ref.scm
1
;; Slot access example
2
;;; 42
3
;;; 10
4
;;; 1
5
(define-class Foo (Object) (x y z))
6
7
(define foo (new Foo))
8
9
(slot-set! foo x 42)
10
(slot-set! foo y 10)
11
(slot-set! foo z 1)
12
(print (slot-ref foo x))
13
(print (slot-ref foo y))
14
(print (slot-ref foo z))