Character-Based Input/Output

YAP implements most of the ISO-Prolog built-ins.

character I/O

Input/Output may be performed on the current stream or on a specified stream. Depending on whether the stream is text or binary, it may involve a:

  • character code

  • character atom

  • byte

Old-style operations, like get0_50 "get0/2" are still implemented.

Functions:

1. static Int get_code(USES_REGS1):

1. static Int get_byte(USES_REGS1):

1. static Int put_code(USES_REGS1):

1. static Int put_byte(USES_REGS1):

1. static Int skip(USES_REGS1):

1. static Int flush_output(USES_REGS1): : "flush_output(+Stream" )

@class flush_output_1

Flush the stream Stream, that is, make sure all pending output is committed before any further execution.

+Stream

1. Int CharOfAtom(Atom at): : CharOfAtom: convert an atom into a single character.

atthe atom return:
the char .

1. int Yap_popChar(int sno):

1. int Yap_peekChar(int sno):

1. int Yap_peekWide(int sno):

1. int Yap_peek(int sno):

1. static int dopeek_byte(int sno):

1. bool store_code(int ch, Term t USES_REGS):

1. static Int at_end_of_stream(USES_REGS1):

1. static Int at_end_of_stream/0(USES_REGS1):

1. static int yap_fflush(int sno):

1. static Int get(USES_REGS1):

1. static Int get_char(USES_REGS1):

1. static Int get/1(USES_REGS1):

1. static Int getcode/1(USES_REGS1):

1. static Int getchar/1(USES_REGS1):

1. static Int get0_line_codes(USES_REGS1):

1. static Int get_byte/1(USES_REGS1):

1. static Int put_code/1(USES_REGS1):

1. static Int put_char/1(USES_REGS1):

1. static Int put_char(USES_REGS1):

1. static Int tab/1(USES_REGS1):

1. static Int tab(USES_REGS1):

1. static Int nl/1(USES_REGS1):

1. static Int nl(USES_REGS1):

1. static Int put_byte/1(USES_REGS1):

1. static Int skip/1(USES_REGS1):

1. static Int flush_outpu/0(USES_REGS1): : "flush_output " );

@class flush_outputUaUU0Uream_3

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_49 "current_output/1".

1. static Int flush_all_streams(USES_REGS1):

1. static Int peek_code(USES_REGS1):

1. static Int peek_code/1(USES_REGS1):

1. static Int peek_byte(USES_REGS1):

1. static Int peek_byte/1(USES_REGS1):

1. static Int peek_char(USES_REGS1):

1. static Int peek_char/1(USES_REGS1):

1. void Yap_flush_all(void):

1. void Yap_FlushStreams(void):

1. void Yap_InitCharsio(void):