bb_put/3

stores a term with a key in a blackboard.

bb_put(+Board, +Key, +Term)

Blackboards are collections of (Key,Value) tuples. With bb_put/3 a tuple (Key,Term) will be stored in the blackboard. If the key Key exists already, then the corresponding Value will be overwritten with Term.

Arguments

Board                  blackboard
Key                    ground term
Term                   term

Examples

Assume there exists a blackboard 'blackboard' with elements (100, abc), (101, element101), (102, abc).

bb_put(blackboard,103, element103). Succeeds. 'blackboard' contains now four elements with keys 100, 101, 102, 103.
bb_put(blackboard, aaa, X). Succeeds. 'blackboard' contains now five elements with keys 100, 101, 102, 103 and aaa.
bb_put(blackboard, 101, 'new element'). Succeeds. 'blackboard' contains now five elements: (100, abc), (101, 'new element'), (102, abc), (103, element103) and (aaa, _1).

Standard

This predicate is not part of the ISO-Prolog Standard.

See also

bb_clear/1, bb_clear_2/2, bb_create/1, bb_contains/2, bb_contains_key/2, bb_get/3, bb_get_4/4, bb_put/3, bb_put_4/4, bb_remove/2. bb_keys/2. bb_elements/2.


Up read on...