[][src]Function clingo_sys::clingo_control_add

pub unsafe extern "C" fn clingo_control_add(
    control: *mut clingo_control_t,
    name: *const c_char,
    parameters: *const *const c_char,
    parameters_size: usize,
    program: *const c_char
) -> bool

Extend the logic program with the given non-ground logic program in string form.

This function puts the given program into a block of form: #program name(parameters).

After extending the logic program, the corresponding program parts are typically grounded with ::clingo_control_ground.

@param[in] control the target @param[in] name name of the program block @param[in] parameters string array of parameters of the program block @param[in] parameters_size number of parameters @param[in] program string representation of the program @return whether the call was successful; might set one of the following error codes:

  • ::clingo_error_bad_alloc
  • ::clingo_error_runtime if parsing fails