anchor.diff:    ierr = xc_set(id, 'pbe', 1.0d0)
     call assert(ierr == 0, "functional name not recognized")
   
  +
     !-----------------------------------------------------------------------------
     ! in the first example we compute the XC energy ("order 0 derivative")
   
  
positive.code: !
  ! For information on the complete list of contributors to the
  ! XCFun library, see: <https://xcfun.readthedocs.io/>
  
  
  subroutine assert(predicate, error_message)
  
    implicit none
  
    logical, intent(in) :: predicate
    character(*), intent(in) :: error_message
  
    if (.not. predicate) then
      print *, 'ERROR:', error_message
      stop 1
    endif
  
  end subroutine
  
  
  program xc_example
  
  ! This example contains calls to f90 interface routines that are needed to "talk
  
negative.code:     end do
  
      call xc_eval(id, num_points, input_array, output_array)
      derivative = output_array(vector_length, 1)
  
      deallocate(input_array)
      deallocate(output_array)
    end function
  
  
    subroutine assert(predicate, error_message)
  
      logical, intent(in) :: predicate
      character(*), intent(in) :: error_message
  
      if (.not. predicate) then
        print *, 'ERROR:', error_message
        stop 1
      endif
  
    end subroutine
  
  end program
  