[fpc-pascal]GNU Scientific Library
Ramom Flores d'as Seixas
fa2ramon at usc.es
Wed Dec 4 21:07:26 CET 2002
Hi:
I'm trying to use the Gnu Scientific Library (GSL) that is written in "C".
Unfortunately my knowledge of C is very limited. This library looks like very
interesting and has a lot of functions, but it has also a lot of nested
include files with a myriad of type definitions. So I'm asking your help.
Are there any document explaining how to translate .h files to units? or
perhaps a C -> Pascal tutorial?
I know the h2pas tool, and I have used it, but I have some dudes how to use
it. Following are some of them:
1) How many *.h files need to be translated?
First I would like to use the minimization stuff that is presented in
the file: "gsl_multimin.h", and in this file there are 5 includes:
one standard, stdlib.h and for specific of gsl: gsl_math.h, gsl_vector.h,
gsl_matrix.h, and gsl_min.h. But these include files call others include
files, for example gsl_math.h calls math.h (C standard), gsl_sys.h,
gsl_machine.h, gsl_precision.h, gsl_nan.h and gsl_pow_int.h.
So translate all the nested include files is a titanic work, that exceeds my
forces. It is possible just translate some of them, which ones?
2) How translate "general" arrays? (Arrays without index).
For example in the file gsl_precision.h appears the following declaration:
extern const double gsl_prec_eps[ ];
that is translated by h2pas as:
gsl_prec_eps : array of double;cvar;external;
but I think this declaration is not correct pascal.
3) What is the equivalent type of "size_t" in pascal? (I think that is a
integer type).
Cheers
Ramom
More information about the fpc-pascal
mailing list