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

27.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"))

This document was generated on March 31, 2014 using texi2html 5.0.

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