write_list(@stream_or_alias, ?list_of_terms)

This built-in predicate outputs a list of terms to an output stream. The output stream must be a text stream that was opened for writing or appending data. See write/2 for information about how the terms are written to the stream.

see also: char_conversion/2 current_char_conversion/2 current_op/3 op/3 read/1 read/2 read_term/2 read_term/3 write/1 write/2 write_canonical/1 write_canonical/2 write_list/1 write_list_goal/2 write_list_goal/3 write_term/2 write_term/3 writeq/1 writeq/2

Example
write_list(user_out, ['Value of X:' , X]). succeeds and the text 'Value of X:' was written to the output stream with the alias 'user_out', then the value of X was written to the same stream

 

Exceptions  
the output stream is associated with a binary stream a permission_error(output, binary_stream, OS) is thrown and OS is substituted by the binary stream

 

 

info@trinc-prolog.com