[comp.lang.scheme] OK. So Here's another Q'n'A!

barton@latcs1.oz.au (DoomsDay) (11/28/90)

OK.  I got the cursor movement, just a matter of patients (sorry!)

But now I have a real problem.

I have defined a structure:

(define-structure cell type name contents)

and want to define 'cells' globally from a procedure.  Given that the
procedure is passed the type, name and contents of the new cell as well as a
referencing name can this be done in any way similar to following:

(define (def-cell addr type name contents)
  (begin (define addr (make-cell))
	 (set! (cell-type addr) type)
	 (set! (cell-name addr) name)
	 (set! (cell-contents addr) contents)))

Currently all this manages to do is define each cell locally to the procedure.
But what I need is some way of defining them globally.

I would really appreciate any ideas on this.  I heard that LISP had an "unwind"
function that did something similar to what I need?  Does scheme?

ADVthAnxNCE!
Doug
barton@latcs1.oz.au

PS: Using T.I. PC Scheme 3.02