[CM] symbol-value (was: 2 questions)

Rick Taube taube@uiuc.edu
Sat, 19 Oct 2002 16:42:02 -0500

>Well, as stated before, that doesn't really help if you're concerned
>with dynamic change of the meaning of a certain symbol during the
>course of the process. I'd rather store references of things than the
>things themselves in the cycle.

use pval, thats what its for. its stores an expression, which can be simply a reference to a variable. this is what happens:

(define (foo n)
  (let ((vbl 0))
    (process with pat = (new cycle 
                          :of (list 'a
                                    (pval vbl)
             repeat n
             (format true " ~s" (next pat))
             (incf vbl))))

(events (foo 30) false)
A 1 C A 4 C A 7 C A 10 C A 13 C A 16 C A 19 C A 22 C A 25 C A 28 C           

>Yes and no. Rick has implemented all or at least most of its
>functionality in a file called loop.scm

its probably 98% of it. i left out hash table iteration and a few things like that. the exact same code is used by cm to implement the 'process' macro in both cltl and scheme so you use cm's loop whether you want to or not!

> and in the formerly mentioned
>slib there is an implementation of loop and, among others, also a
>complete implementation of format.

for some perverse reason i doggedly stuck with guile's "simple format" even after i became aware of the more full featured one. as a result cm only needs/uses ~a and ~s.