GNU Scientific Library in D

Tomas Lindquist Olsen tomas at famolsen.dk
Mon Jul 23 11:09:26 PDT 2007


On Mon, 23 Jul 2007 14:05:19 -0400, Lars Kyllingstad wrote:

> Hello,
> 
> I would like to use the GNU Scientific Library, which is written in C, in
> D. While converting the header files to D modules, however I ran in to the
> following problem. In gsl_math.h, the following (crucially important)
> struct is defined:
> 
> struct gsl_function_struct
> {
>   double (* function) (double x, void * params); void * params;
> };
> 
> Note that the first member is named 'function', which unfortunately is a
> keyword in D. Any suggestions as to how I can work around this?
> 
> -Lars

Renaming it to func or something else in you D header is not going to
break anything.

-Tomas



More information about the Digitalmars-d mailing list