Learn R Programming

rswipl (version 9.3.21)

submit: Submit a query that has been opened with query() before.

Description

Submit a query that has been opened with query() before.

Usage

submit()

Arguments

Value

If the query fails, FALSE is returned. If the query succeeds, a (possibly empty) list is returned that includes the bindings required to satisfy the query.

See Also

query() for a opening a query.

clear() for a clearing a query.

Examples

Run this code
query(call("member", expression(X), list(quote(a), "b", 3L, 4, expression(Y))))
submit() # X = 3L
submit() # X = 4.0
submit() # X = TRUE
submit() # X = expression(Y) or Y = expression(X)
submit() # FALSE
submit() # warning that no query is open

query(call("member", expression(X), list(quote(a), "b", 3L, 4)))
submit() # X = a
submit() # X = "b"
clear()

Run the code above in your browser using DataLab