[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
26.1.2 Importing an extern variable
The <variable-clause> denotes importation of variables.
<variable-clause> →(
<typed-ident> <c-name>)
|(macro
<typed-ident> <string>)
|(macro
<typed-ident>(
<typed-ident>+)
<string>)
|(infix macro
<typed-ident>(
<typed-ident>+)
<string>)
Only extern “non-macro
” variables are mutable (that is
mutable using the set!
construction). Bigloo does not emit
“extern C prototype” for variables introduced by a macro
clause. <string> is the C name of variable. The Scheme name
of that variable is extracted from the <typed-ident>.
Here is an example of variable importations:
(module example (extern (c-var::double "c_var") (macro bufsiz::long "BUFSIZ"))) (print "c-var: " c-var) (set! c-var (+ 1.0 c-var)) (print "c-var: " c-var) (print "bufsize: " BUFSIZ)
This document was generated on October 23, 2011 using texi2html 5.0.