Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Prolog/Built-in predicates

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

List of built-in predicates in ISO Prolog. Term unification =/2 Prolog unification unify_with_occurs_check/2 (\=)/2 Not Prolog unifiable Type testing var/1 True if term currently is a variable atom/1 True if term is bound to an atom integer/1 True if term is bound to an integer float/1 True if term is bound to a floating point number atomic/1 True if term is bound to an atom, integer or floating point number compound/1 True if term is bound to a compound term nonvar/1 True if term is not a variable number/1 True if term is bound to an integer or floating point number Term comparison (@=<)/2 Term less than or equal to (==)/2 Term identical (\==)/2 Term not identical (@<)/2 Term less than (@>)/2 Term greater than (@>=)/2 Term greater than or equal to Term creation and decomposition functor/3 arg/3 (=../2) copy_term/2 Arithmetic evaluation is/2 Arithmetic comparison '=:='/2 Arithmetic equal '=\='/2 Arithmetic not equal '<'/2 Arithmetic less than '=<'/2 Arithmetic less than or equal to '>'/2 Arithmetic greater than '>='/2 Arithmetic greater than or equal to Clauses Clause retrieval and information clause/2 current_predicate/1 Clause creation and destruction asserta/1 assertz/1 retract/1 abolish/1 All solutions findall/3 bagof/3 setof/3 Input and output Stream selection and control current_input/1 current_output/1 set_input/1 set_output/1 open/4, open/3 Opening a stream close/1, close/2 Closing a stream stream_property/2 at_end_of_stream/1, at_end_of_stream/0 set_stream_position/2 Character input-output get_char/2, get_char/1 get_code/2, get_code/1 peek_char/2, peek_char/1 peek_code/2, peek_code/1 put_char/2, put_char/1 put_code/2, put_code/1 nl/0, nl/1 Reading from binary streams get_byte/2, get_byte/1 peek_byte/2, peek_byte/1 put_byte/2, put_byte/1 Term input and output read_term/2, read_term/3 read/1, read/2 Writing terms write_term/3, write_term/2 write/1, write/2 writeq/1, writeq/2 write_canonical/1, write_canonical/2 Operators op/3 current_op/3 Character conversion char_conversion/2 current_char_conversion/2 Logic and control (\+)/1 Not provable once/1 repeat/0 Atom processing atom_length/2 atom_concat/3 sub_atom/5 atom_chars atom_codes/2 char_code/2 number_chars/2 number_codes/2 Implementation defined hooks set_prolog_flag/2 current_prolog_flag/2 halt/0, halt/1 Functors Evaluable functors (+)/2 Addition (-)/2 Subtraction (*)/2 Multiplication (//)/2 Integer division (/)/2 Division (rem)/2 Remainder (mod)/2 Modulus (-)/1 Negation (abs)/1 Absolute value (sign)/1 Sign (float_integer_part)/1 Integer part (float_fractional_part)/1 Fractional part (float)/1 Float coercion (floor)/1 Floor (truncate)/1 Truncate (round)/1 Round (ceiling)/1 Ceiling Other arithmetic and bitwise functors (**)/2 Power sin/1 Sine cos/1 Cosine atan/1 Arc tangent exp/1 Exponentiation log/1 Log sqrt/1 Square root (>>)/2 Bitwise right shift (<<)/2 Bitwise left shift (/\)/2 Bitwise and (\/)/2 Bitwise or (\)/1 Bitwise complement it:Prolog/Predicati built-in pt:Prolog/Predicados embutidos