4.6.10 Summary of Predicates and Functions
Reference pages for the following provide further detail on the
material in this section.
at_end_of_lineat_end_of_line(+S)- testing whether at end of line on input stream S
at_end_of_stream ISOat_end_of_stream(+S) ISO- testing whether end of file is reached for the input stream S
flush_output ISOflush_output(+S) ISO- flush the output buffer for stream S
get_byte(-C) ISOget_byte(+S,-C) ISO- C is the next byte on binary input stream S
get_char(-C) ISOget_char(+S,-C) ISO- C is the next character atom on text input stream S
get_code(-C) ISOget_code(+S,-C) ISO- C is the next character code on text input stream S
nl ISOnl(+S) ISO- send a newline to stream S
peek_byte(+C) ISOpeek_byte(+S,+C) ISO- looks ahead for next input byte on the binary input stream S
peek_char(+C) ISOpeek_char(+S,+C) ISO- looks ahead for next input character atom on the text input stream S
peek_code(+C) ISOpeek_code(+S,+C) ISO- looks ahead for next input character code on the text input stream S
put_byte(+C) ISOput_byte(+S,+C) ISO- write byte C to binary stream S
put_char(+C) ISOput_char(+S,+C) ISO- write character atom C to text stream S
put_code(+C) ISOput_code(+S,+C) ISO- write character code C to text stream S
skip_byte(+C)skip_byte(+S,+C)- skip input on binary stream S until after byte C
skip_char(+C)skip_char(+S,+C)- skip input on text stream S until after char C
skip_code(+C)skip_code(+S,+C)- skip input on text stream S until after code C
skip_lineskip_line(+S)- skip the rest input characters of the current line (record)
on the input stream S
byte_count(+S,-N)- N is the number of bytes read/written on
binary stream S
character_count(+S,-N)- N is the number of characters read/written on
text stream S
close(+F) ISOclose(+F,+O) ISO- close file or stream F with options O
current_input(-S) ISO- S is the current input stream
current_output(-S) ISO- S is the current output stream
current_stream(?F,?M,?S)- S is a stream open on file F in mode M
line_count(+S,-N)- N is the number of lines read/written on text stream S
line_position(+S,-N)- N is the number of characters read/written on the
current line of text stream S
open(+F,+M,-S) ISOopen(+F,+M,-S,+O) ISO- file F is opened in mode M, options O, returning stream S
open_null_stream(+S)- new output to text stream S goes nowhere
prompt(-O,+N)- queries or changes the prompt string of the current input stream
see(+F)- make file F the current input stream
seeing(-N)- the current input stream is named N
seek(+S,+O,+M,+N)- seek to an arbitrary byte position on the
stream S
seen- close the current input stream
set_input(+S) ISO- select S as the current input stream
set_output(+S) ISO- select S as the current output stream
set_stream_position(+S,+P) ISO- P is the new position of stream S
stream_code(?S,?C)- Converts between Prolog and C representations of a stream
stream_position(+S,-P)- P is the current position of stream S
stream_position_data(?Field,?Position,?Data)- The Field field of the stream position term Position is Data.
stream_property(?Stream, ?Property)) ISO- Stream Stream has property Property.
tell(+F)- make file F the current output stream
telling(-N)- to file N
told- close the current output stream
char_conversion(+InChar, +OutChar) ISO- The mapping of InChar to OutChar is added to the
character-conversion mapping.
current_char_conversion(?InChar, ?OutChar) ISO- InChar is mapped to OutChar in the current
character-conversion mapping.
current_op(?P,?T,?A) ISO- atom A is an operator of type T with precedence P
display(+T)- write term T to the user output stream in prefix notation
format(+C,:A)format(+S,+C,:A)- write arguments A on stream S according to control
string C
op(+P,+T,+A) ISO- make atom A an operator of type T with precedence P
user:portray(+T) hook- tell
print/[1,2] and write_term/[2,3] what to do
portray_clause(+C)portray_clause(+S,+C)- write clause C to the stream S
print(+T) hookableprint(+S,+T) hookable- display the term T on stream S
using
user:portray/1 or write/2
read(-T) ISOread(+S,-T) ISO- read term T from stream S
read_term(-T,+O) ISOread_term(+S,-T,+O) ISO- read T from stream S according to options O
write(+T) ISOwrite(+S,+T) ISO- write term T on stream S
write_canonical(+T) ISOwrite_canonical(+S,+T) ISO- write term T on stream S so that it can be read
back by
read/[1,2]
writeq(+T) ISOwriteq(+S,+T) ISO- write term T on stream S, quoting atoms where necessary
write_term(+T,+O) ISO,hookablewrite_term(+S,+T,+O) ISO,hookable- writes T to S according to options O
Send feedback on this subject.