Re: Pre-Scheme static allocation
Thomas Hintz <[email protected]> Wed, 28 Oct 2015 09:38:59 -0700
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Oct 28, 2015, at 01:03 AM, Michael Sperber wrote: > But what you're trying to do still seems odd to me - maybe you can > provide a little bit more background on why you're trying to do this? > (I.e. why not just `(string-ref "hello-world" 0)`.) In this case I would like to keep a buffer of characters that are being displayed on the screen. So I need to be able to do operations like "string-ref" and "string-set!" on that buffer. But if I try to do this: (let ((buf "000000")) (string-set! buf 0 #\a) (string-ref buf 0)) the pre-scheme compiler inlines 'buf', which obviously is not what I want. (I didn't actually know that the pre-scheme string operations worked on anything other than strings created with 'make-string', but I believe I'm still left with the same fundamental problem.) Thanks, Thomas Hintz