=

BAP Online Manuals : Library Reference : Library by Name : =
Previous: ! (cut)
Next: =..

6.2.2. =

matches two terms

SYNOPSIS

OPERATOR op(700,xfx,=).
PREDICATE =(void,void).
=(X,X).

hello = X

SYNTAX

=(Term1,Term2) (x,x)
Term1 = Term2  (x,x)

ARGUMENTS

void(Term1) (x) Term1 to be matched
void(Term2) (X) Term2 to be matched

DESCRIPTION

This is a standard prolog built-in. '=' succeeds, if Term1 can be matched with Term2, instantiating or sharing any variables contained in the progress.
NOTE: unlike certain PROLOG implementations, = does never any numeric evaluation to a term. Instead the is() predicate is used.

EXAMPLE

read(X),
( X = ende, ! ;  integer(X), write("Integer"),nl, fail ).

ERRORS

No runtime errors.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

\= , is


BAP Online Manuals : Library Reference : Library by Name : =
Previous: ! (cut)
Next: =..