anchor.diff:      ! Convert inputs from C types to Fortran types
       call c_f_procpointer(func, func_p)
       call c_f_procpointer(grad, grad_p)
  -    dim = dim_c
  -    approximation_size = approximation_size_c
  -    f_tolerance = f_tolerance_c
  -    g_tolerance = g_tolerance_c
  -    ! Array copies
  +    ! Array copies (TODO are these necessary? i.e. how compatible are the storage and types?)
       bounds_control = bounds_control_c
       lower_bounds = lower_bounds_c
       upper_bounds = upper_bounds_c
  
positive.code:          task(1:5) == 'START')
  
         ! Call L-BFGS-B code
         call setulb(dim, approximation_size, point, &
              lower_bounds, upper_bounds, bounds_control, &
              func_value, grad_value, &
              f_factor, g_tolerance, &
              working_real_memory, working_int_memory, &
              task, print_control, &
              char_state, bool_state, int_state, real_state)
  
negative.code:     ! Fortran versions of arguments
      procedure(objective_function_c), pointer :: func_p
      procedure(objective_gradient_c), pointer :: grad_p
      integer :: bounds_control(dim_c)
      real(dp) :: lower_bounds(dim_c), upper_bounds(dim_c), point(dim_c)
      ! Variables and memory for L-BFGS-B
  