print/1/2

print/1/2 は、項のリストを出力する。

print (+リスト)
print (+ストリーム, +リスト)

print/1 は、現在出力ストリームにリストの全要素を、以下の形で出力する。 (関連 current_output/1)

print/2は、ストリームにリストの全要素を、以下の形で出力する。

引数

ストリーム             テキスト出力ストリーム
リスト                 項のリスト

?- X=1,Y=2,Z is 1+2, print(['the sum of ', X, ' + ', Y, ' is ', Z]).

the sum of 1 + 2 is 3

標準

これらの述語は、ISO-Prolog 標準には含まれない。

関連

current_op/3, op/3, println/1/2, read/1/2, read_term/2/3, write/1/2, write_canonical/1/2, write_term/2/3, writeq/2.


戻る 続く..