![]() |
YAP 7.1.0
|
YAP implements most of the ISO-Prolog built-ins. More...
YAP implements most of the ISO-Prolog built-ins.
{@
Input/Output may be performed on the current stream or on a specified stream, and it may involve a:
Old-style operations, like get0/2 are still implemented
character I/O
class at_end_of_stream/1 |
at_end_of_stream(+ S)
defined in the ISO standard
Succeed if the stream S has stream position end-of-stream or past-end-of-stream Note that S must be a readable stream
class at_end_of_stream/0 |
at_end_of_stream
defined in the ISO standard
Succeed if the current stream has stream position end-of-stream or past-end-of-stream
class get/2 |
get(S, - C)
The next non-blank character from the stream S is unified with C Blank characters are the ones whose ASCII codes are not greater than 32 If there are no more non-blank characters in the stream, C is unified with -1 If end_of_stream
has already been reached in the previous reading, this call will give an error message
class get_char/2 |
get_char(+ S,- C)
defined in the ISO standard
If C is unbound, or is an atom representation of a character, and the stream S is a text stream, read the next character from that stream and unify its representation as an atom with C
class get_code/2 |
get_code(+ S,- C)
defined in the ISO standard
If C is unbound, or is a character code, and the stream S is a text stream, read the next character from that stream and unify its code with C
class get/1 |
get(- C)
The next non-blank character from the current input stream is unified with C Blank characters are the ones whose ASCII codes are not greater than 32 If there are no more non-blank characters in the stream, C is unified with -1 If end_of_stream
has already been reached in the previous reading, this call will give an error message
class get_code/1 |
get_code(- C)
defined in the ISO standard
If C is unbound, or is the code for a character, and the current stream is a text stream, read the next character from the current stream and unify its code with C
class get_char/1 |
get_char(- C)
defined in the ISO standard
If C is unbound, or is an atom representation of a character, and the current stream is a text stream, read the next character from the current stream and unify its atom representation with C
class get_byte/2 |
get_byte(+ S,- C)
defined in the ISO standard
If C is unbound, or is a byte, and the stream S is a binary stream, read the next byte from that stream and unify its code with C A byte is represented as either a number between 1 and 255, or as -1 for EOF
class get_byte/1 |
get_byte(- C)
defined in the ISO standard
If C is unbound, or is a character code, and the current stream is a binary stream, read the next byte from the current stream and unify its code with C
class put_code/1 |
put_code(+ N)
defined in the ISO standard
Outputs to the current output stream the character whose ASCII code is N The current output stream must be a text stream The character N must be a legal ASCII character code, an expression yielding such a code, or a list in which case only the first element is used
class put_code/2 |
put_code(+ S,+ N)
defined in the ISO standard
As put_code(N)
, but to text stream S
class put_char/1 |
put_char(+ N)
defined in the ISO standard
Outputs to the current output stream the character who is used to build the representation of atom A
The current output stream must be a text stream
class put_char/2 |
put_char(+ S,+ A)
defined in the ISO standard
As put_char(A)
, but to text stream S
class tab/1 |
tab(+ N)
Outputs N spaces to the current output stream
class tab/2 |
tab(+ S,+ N)
The same as tab/1 , but using stream S
class nl/1 |
nl(+ S)
defined in the ISO standard
Outputs a new line to stream S
class nl/0 |
nl
defined in the ISO standard
Outputs a new line to the current output stream
class put_byte/2 |
put_byte(+ S,+ N)
defined in the ISO standard
As put_byte(N)
, but to binary stream S
class put_byte/1 |
put_byte(+ N)
defined in the ISO standard
Outputs to the current output stream the character whose code is N The current output stream must be a binary stream
class skip/1 |
skip(+ N)
Skips input characters until the next occurrence of the character with ASCII code N The argument to this predicate can take the same forms as those for put
(see 6.11)
class skip/2 |
skip(+ S,- C)
Like skip/1 , but using stream S instead of the current input stream
class flush_output/1 |
flush_output(+Stream)
Flush the stream Stream, that is, make sure all pending output is committed before any further execution
+_Stream_ |
class flush_output/0 |
flush_output
Flush the current output stream, that is, make sure all pending output is committed before any further execution By default this is user_output, but it may be changed by current_output/1
class peek_code/2 |
peek_code(+ S, - C)
defined in the ISO standard
If C is unbound, or is the code for a character, and the stream S is a text stream, read the next character from the current stream and unify its code with C, while leaving the current stream position unaltered
class peek_code/1 |
peek_code( - C)
defined in the ISO standard
If C is unbound, or is the code for a character, and the current input stream is a text stream, read the next character from the current stream and unify its code with C, while leaving the current stream position unaltered
class peek_byte/2 |
peek_byte(+Stream, - C)
defined in the ISO standard
If C is unbound, or is a character code, and Stream is a binary stream, read the next byte from the current stream and unify its code with C, while leaving the current stream position unaltered
class peek_byte/1 |
peek_byte( - C)
defined in the ISO standard
If C is unbound, or is a character code, and Stream is a binary stream, read the next byte from the current stream and unify its code with C, while leaving the current stream position unaltered
class peek_char/2 |
peek_char(+_S_, - C)
defined in the ISO standard
If C is unbound, or is a character code, and the stream S is a binary stream, read the next byte from the current stream and unify the atom with C, while leaving the stream position unaltered
class peek_char/1 |
peek_char( - C)
defined in the ISO standard
If C is unbound, or is a character code, and the current input stream is a binary stream, read the next byte from the current stream and unify the atom with C, while leaving the stream position unaltered
class peek/2 |
peek(+ S, - C)
deprecated
If C is unbound, or is the code for a character, and the stream S is a text stream, read the next character from the current stream and unify its code with C, while leaving the current stream position unaltered
Please use the ISO built-in peek_code/2
class peek/1 |
peek( - C)
defined in the ISO standard
If C is unbound, or is the code for a character, and the currrent input stream is a text stream, read the next character from the current stream and unify its code with C, while leaving the current stream position unaltered
class ttyget/1 |
ttyget(- C)
The same as get(C)
, but from stream user_input
class ttyget0/1 |
ttyget0(- C)
The same as get0(C)
, but from stream user_input
class ttyskip/1 |
ttyskip(- C)
Like skip/1 , but always using stream user_input stream
class ttyput/1 |
ttyput(+ N)
As put(N)
but always to user_output
Int CharOfAtom | ( | Atom | at | ) |
Functions | |
Int | CharOfAtom (Atom at) |
CharOfAtom: convert an atom into a single character. More... | |
int | Yap_popWide (int sno) |
int | Yap_peekWide (int sno) |
int | Yap_popChar (int sno) |
int | Yap_peekChar (int sno) |
int | Yap_peek (int sno) |
bool | store_code (int ch, Term t USES_REGS) |
void | Yap_flush_all (void) |
void | Yap_FlushStreams (void) |
void | Yap_InitCharsio (void) |