[gambit-list] using #defined values

Alex Queiroz asandroq at gmail.com
Tue Nov 10 09:13:08 EST 2009


Hallo,

On 11/10/09, Aditya Godbole <aag.lists at gmail.com> wrote:
> Hi,
>
>  Is it possible to use preprocessor declarations in scheme code?
>  If say:
>
>  (c-declare #<<c-declare-end
>
>  #define ABC 1000
>  c-declare-end
>  )
>
>  Is there a way to use ABC when passing a value to a c-lambda?
>

     You must create a variable in Scheme-land too:

(define *ABC* ((c-lambda () int "___result = ABC;")))

Cheers,
-- 
-alex
@asandroq
http://www.ventonegro.org/



More information about the Gambit-list mailing list