Re: problem with class variables in stklos

From: Rob DeLine <>
Date: Thu, 5 Sep 1996 13:38:43 -0400

Erik asks:
>Is there an approved way of doing class slots? Could it be made
>possible to set `:class'-allocated slots in define-class rather than
>having to create an instance first?

I use class allocated slots all the time. The way to set them in
define-class is with the :initform slot option. Here's an example:

(define-class <Whatever> ()
  [(shared-counter :allocation :class :initform 0)])

Although I've used a simple initial value here (0), I could put arbitrary
complex expression after the :initform keyword.

Good luck.
Rob DeLine
Received on Thu Sep 05 1996 - 19:40:44 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST