chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Optimal C


From: felix winkelmann
Subject: Re: [Chicken-users] Optimal C
Date: Sun, 22 Feb 2009 23:56:47 +0100

On Sun, Feb 22, 2009 at 11:44 PM, felix winkelmann <address@hidden> wrote:
>>
>> 1. crunch.h wasn't created/copied it my std include. I had to
>> chicken-setup -keep and go to the directory.
>> The file is named "include". I'm guessing that the script expected
>> there to be a local directory named include but it didn't exist, so
>> `mv crunch.h include` failed in such a manner.

Indeed. This should be caught. Thanks for pointing this out.

>>
>> 2. I tried compiling the example at the bottom of the page at
>> http://chicken.wiki.br/crunch and it failed with:
>> Error: name used in bad context
>> "Definition"
>> (#(define 0 6) string-reverse (#(lambda 1 5) (str) (#(let-syntax 2 7)
>> () (let* ((n (string-length str)) (s2 (make-string n #\space))) (do
>> ((i 0 (add1 i))) ((>= i n)) (string-set! s2 (sub1 (- n i)) (string-ref
>> str i))) s2))))
>>
>

Have you used the chicken-crunch program? The example is meant
to be directly included into Scheme code, so you should compile
the example with:

csc -c++ example.scm

To use it with "chicken-crunch", remove the "crunch" macro around the
definition (and the "use" form as well).


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]