[Gambas-user] Gambas3 and Gnu scientific library

John Spikowski support at ...2529...
Sat May 21 18:54:03 CEST 2011


On Sat, 2011-05-21 at 18:27 +0200, wally wrote:
> Jussi,
> 
> GSL is grouped in similar functions and i think if one member of a group
> works already, the remaining members should work also with similar code.
> I will try to make an emsemble of gb3 snippets and see what else is necessary
> to cover at least some main features of GSL.
> 
> wally

I'm adding GSL support to ScriptBasic by dynamically scripting the
library at run time. My interests in GSL don't require a GUI so Gambas
is overkill in my case. Here is an example of calling the "Regular
Cylindrical Bessel" function.

DECLARE SUB DLL ALIAS "_idll" LIB "gtk-server"
DECLARE SUB REQUIRE ALIAS "_idll_require" LIB "gtk-server"
DECLARE SUB DEFINE ALIAS "_idll_define" LIB "gtk-server"

REQUIRE "libgsl.so"
DEFINE "gsl_sf_bessel_J0 NONE DOUBLE 1 DOUBLE"

PRINT FORMAT("J0(%g) = %.18e\n", 5.0, DLL("gsl_sf_bessel_J0 " & 5.0))

RESULTS:

J0(5) = -1.775970000000000326e-01








More information about the User mailing list