Function clingo_sys::clingo_program_builder_add
[−]
[src]
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.
Parameters:
builder
- the target program builderstatement
- the statement to add
Returns 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