2 ! Verify that initialization of c_ptr components works. This is based on
4 ! http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/
7 use, intrinsic :: iso_c_binding
11 ! Kind and length parameters are default integer
13 integer, parameter, public :: fgsl_double = c_double
16 ! Types : Array support
18 type, public :: fgsl_vector
20 type(c_ptr) :: gsl_vector = c_null_ptr
24 function fgsl_vector_align(p_x, f_x)
25 real(fgsl_double), pointer :: p_x(:)
26 type(fgsl_vector) :: f_x
27 integer :: fgsl_vector_align
29 end function fgsl_vector_align
36 subroutine expb_df() bind(c)
37 type(fgsl_vector) :: f_x
38 real(fgsl_double), pointer :: p_x(:)
40 status = fgsl_vector_align(p_x, f_x)
41 end subroutine expb_df