manpagez: man pages & more
info bigloo
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

25.1.6.6 C functions

C function types are introduced by the <function-type> clause:

 
<function-type> → (function <ident> (<ident>*))

Let us suppose the array type declaration:

 
(type fun (function res (arg*)) ...)

Bigloo creates the following functions:

Suppose we have to use in Scheme the following C variable:

 
double (*convert)(char *);

It can be done as in:

 
(module foo 
   (extern
    (type *string->double
          (function double (string)) 
                    "double (*)(char *)")
    (macro cv::*string->double "convert")))

(print (*string->double-call cv "3.14"))

© manpagez.com 2000-2026
Individual documents may contain additional copyright information.