BAP Online Manuals : Library Reference : Library by Name : string
Previous: str_len
Next: tell

6.2.128. string

test whether the type of its argument is string.

SYNOPSIS

string(Term)

SYNTAX

 string(Term) (i)

ARGUMENTS

void(Term) (i) Term to be tested.

DESCRIPTION

String() succeeds if its argument is unbound or currently bound to a string.

NOTE: This implementation of BAP treats strings and atom just the same. This might change in future releases.

EXAMPLE

read(X),
( string(X), write("String"),nl ;
  integer(X), write("Integer"),nl
).

ERRORS

No runtime errors.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

atom , integer , char


BAP Online Manuals : Library Reference : Library by Name : string
Previous: str_len
Next: tell