YAP 7.1.0
Operations on Sequences of Codes.

Term to sequence of codes conversion, mostly replaced by engine code. More...

Detailed Description

Term to sequence of codes conversion, mostly replaced by engine code.

You can use the following directive to load the files

:- use_module(library(charsio)).
use_module( +Files )

It includes the following predicates:


Class Documentation

◆ format_to_chars/3

class format_to_chars/3

format_to_chars(+ Form, + Args, - Result)

Execute the built-in procedure format/2 with form Form and arguments Args outputting the result to the string of character codes Result

◆ format_to_chars/4

class format_to_chars/4

format_to_chars(+ Form, + Args, - Result, - Result0)

Execute the built-in procedure format/2 with form Form and arguments Args outputting the result to the difference list of character codes Result-Result0

◆ write_to_chars/2

class write_to_chars/2

write_to_chars(+ Term, - Result)

Execute the built-in procedure write/1 with argument Term outputting the result to the string of character codes Result

◆ write_to_chars/3

class write_to_chars/3

write_to_chars(+ Term, - Result0, - Result)

Execute the built-in procedure write/1 with argument Term outputting the result to the difference list of character codes Result-Result0

◆ atom_to_chars/2

class atom_to_chars/2

atom_to_chars(+ Atom, - Result)

Convert the atom Atom to the string of character codes Result

◆ atom_to_chars/3

class atom_to_chars/3

atom_to_chars(+ Atom, - Result0, - Result)

Convert the atom Atom to the difference list of character codes Result-Result0

◆ number_to_chars/2

class number_to_chars/2

number_to_chars(+ Number, - Result)

Convert the number Number to the string of character codes Result

◆ number_to_chars/3

class number_to_chars/3

number_to_chars(+ Number, - Result0, - Result)

Convert the atom Number to the difference list of character codes Result-Result0

◆ open_chars_stream/2

class open_chars_stream/2

open_chars_stream(+ Chars, - Stream)

Open the list of character codes Chars as a stream Stream

◆ with_output_to_chars/2

class with_output_to_chars/2

with_output_to_chars(? Goal, - Chars)

Execute goal Goal such that its standard output will be sent to a memory buffer After successful execution the contents of the memory buffer will be converted to the list of character codes Chars

◆ with_output_to_chars/3

class with_output_to_chars/3

with_output_to_chars(? Goal, ? Chars0, - Chars)

Execute goal Goal such that its standard output will be sent to a memory buffer After successful execution the contents of the memory buffer will be converted to the difference list of character codes Chars-Chars0

◆ with_output_to_chars/4

class with_output_to_chars/4

with_output_to_chars(:Goal, -Stream, -Codes, ?Tail) is det

% % As with_output_to_chars/2 , but Stream is unified with the % temporary stream

with_output_to_chars(? Goal, - Stream, ? Chars0, - Chars)

Execute goal Goal such that its standard output will be sent to a memory buffer After successful execution the contents of the memory buffer will be converted to the difference list of character codes Chars-Chars0 and Stream receives the stream corresponding to the memory buffer

◆ read_from_chars/2

class read_from_chars/2

read_from_chars( + Chars, - Term)

Parse the list of character codes Chars and return the result in the term Term The character codes to be read must terminate with a dot character such that either (i) the dot character is followed by blank characters; or (ii) the dot character is the last character in the string

Note
The SWI-Prolog version does not require Codes to end in a full-stop