Re: Pre-Scheme static allocation

Thomas Hintz <[email protected]> Tue, 27 Oct 2015 10:40:25 -0700
Newsgroups gmane.lisp.scheme.scheme48
Message-ID <[email protected]>
On Sat, Oct 24, 2015, at 04:44 AM, Michael Sperber wrote:
> 
> Thomas Hintz <[email protected]> writes:
> 
> > Greetings,
> >
> > Is it possible for Pre-Scheme to generate static array allocations? I'm
> > looking for something like:
> >
> > char hello[] = "Hello, world.";
> 
> You mean:
> 
> (define hello "Hello, world.")
> 
> ?  (Probably not, but I'm not really sure what you mean.)

That does not seem to do what I want to do.

Maybe I'm missing something with the type inference system or the API.
Here is an example of what I would like to do:

(unsigned-byte-ref "hello world")

or:

(define hello "Hello, world.")
(unsigned-byte-ref hello)

Which doesn't work.

(Note that I don't have access to malloc and friends so I can't use the
'make-string' API, AFAIK.)

Thanks and all the best,
Thomas Hintz