[][src]Function clingo_sys::clingo_program_builder_add

pub unsafe extern "C" fn clingo_program_builder_add(
    builder: *mut clingo_program_builder_t,
    statement: *const clingo_ast_statement_t
) -> bool

Adds a statement to the program.

@attention @ref clingo_program_builder_begin() must be called before adding statements and @ref clingo_program_builder_end() must be called after all statements have been added. @param builder the target program builder @param statement the statement to add @return whether the call was successful; might set one of the following error codes:

  • ::clingo_error_runtime for statements of invalid form
  • ::clingo_error_bad_alloc