Predicates on Text

The following predicates are used to manipulate text in Prolog.

Text may be represented as atoms, strings, lists of codes, and lists of chars. List based representation_errors are easier to manipulate, but they are difficult From other lists.

Atoms are entries in the symbol table, Strings are allocated dynamically and disappear on backtracking.

Functions:

1. static Int hide_atom(USES_REGS1): : "hide_atom(+ Atom" )

@class hide_atom_1

Make atom Atom invisible, by removing it from the Atom Table.

Existing referebces are still active. Defining a new atom with the same characters will result in a different entry in the symbol table.

1. static Int hidden_atom(USES_REGS1):

1. static Int unhide_atom(USES_REGS1):

1. static Int char_code(USES_REGS1):

1. static Int name(USES_REGS1):

1. static Int string_to_atomic(USES_REGS1): : "string_to_atomic(?S, ?Atomic" )

@class string_to_atomic_2

Unify from a string S with a number, if S can be parsed as such, or otherwise to an atom.

Examples: ```

string_to_atomic("yap",L).

 will return:

L = yap.

 and

name("3",L).

 will return:

L = 3. ```