print(+ストリーム,+フォーマット,[+項,...])...
Move to
=> <=
Darueber Spitze
See also
バージョン3から4への移行
イントロダクション
abolish
abort
# append
arg
計算式(arithmetic)
アリティ(arity)
ASCII文字
assert
asserta_term, asserto_term, assertz_term
atom, atomic_length
\(バックスラッシュ)
#bagof, #setof
block, exit_block, cut_block
break
bye
call, execute
文字セット, char_code
#clause, #clause_term
clear_eol, clear_eos, clear_screen
close
コメント
compare
項の比較
値の比較
compiles
concat
連言(conjunction)
consult
コントロールスタック(control stack)
データの型変換(conversion)
copy_term
correct
cpu時間
#current_predicate, #current_atom, current_language
!(カット)
データベース(database)
debug, nodebug, debug_goal
debug_mode
decompcons
指令(directives)
選言(disjunction)
display
編集(edit)
終了(end)
end_of_file文字
equiv_char, image_length, byte_length
例外処理(exceptions)
error_protect, exception, exception_handler
exists
exit
expand_term, phrase(+ゴール,?リスト)
?- export, ?- common, ?- import, ?-hidden
事実(fact)
fail
filepos, files, flush, reset_streams
findall
float_format
# for
functor
gc
get, get0, get_until
getchar
getenv, get_home, get_last, move_cursor
get_global, # global_variable
ゴール(goal)
文法規則(grammar rules)
リストの先頭(head of list)
節のヘッド(head of clause)
help
ifprolog
ifsem
include
index
入力ストリーム(input stream)
インタプリタレベル(interpreter level)
is
length, #reverse
list_mode, listing
リスト(lists)
load, loaded
localtime
ループ(loops)
lower_upper, national_letters
make_atom, make_number
match, # match
# member
modify_mode
?- module, ?- module_body
name
nl
:- nonotify, nonotify
not
number
once
オペレータ(operator)
op, # current_op
outpos, outtab
出力ストリーム(output stream)
program_parameters, system_parameters, user_parameters
parse_atom
parse_position
predicate, predicate_mode
predicate_type
print
手続き(procedure)
program
# prolog_flag
prolog_library
prolog_system, prolog_version, proroot
put
put_byte, get_byte
raise_error
read, read_term
read_error, report_read_error
reconsult(+ファイル名)
# repeat
#retract
retractop
save_system, save_module
see, seeing, seen
set_global
set_home, setoutpos, setupterm
signal, signal_handler, alarm
skip
sort, keysort
spy
dbsize, ssize, gused, dbused, tused, lused
statistics
open, close, stream_control, #current_stream, link_stream
文字列(strings)
複合項(structures)
subatomic
sum, inc
symbol
計算式の構文(syntax of arithmetic expression)
構文チェッカー(syntax checker)
syntax_error
項の構文 (Syntax of terms)
system
system_date, system_time
system_predicate
tab
tell, telling, told
項(term)
X is time
trace, notrace, trace_mode, trace_goal
trace, tracing, traced
トレイル(trail)
true
tty_size
type_of, atom, nonvar, atomic, numeric, digit, realn, integer, struct, letter, var
未定義の述語(undefined_predicate)
?項1 = ?項2, +項1 \= +項2
?複合項 =.. -Univリスト, -複合項 =.. ?Univリスト
unload
unset_global
user
変数(variables)
write
IF Computer > IF/Prolog > Manuals > IF/Prolog V4.1 マニュアル > IF/Prolog V4.1 レファレンスマニュアル > print

print

MINERVA superseeded IF/Prolog. Please see http://www.ifcomputer.co.jp/MINERVA for details.

We discontinued to sell IF/Prolog Dec 31. 2003. For current customers, we continue to provide professional support for IF/Prolog until Dec 31, 2008.

print(+ストリーム,+フォーマット,[+項,...]) print(+フォーマット,[+項,...])

IF/Prologのprint/2,/3は、Cのprintfと似た述語で、書式付き出力を行います。「フォ−マット」は、書式に関する情報を含むアトムでなければなりません。この書式文字列中の各文字は通常はそのままプリントされ、'%'で始まる書式指定だけが特別に扱われます(詳細については、C言語によるプログラミングについての本を参照して下さい)。

print/2は標準出力に書式付きで出力し、print/3はあらかじめ開いてあるストリ−ムに書式付きで出力します。

すべての書式指定は次のような形をしています。

%<-><長さ><.幅><書式文字>

長さ: 出力フィ−ルドの長さです。文字列は右詰めで出力されます。

-長さ: 出力フィ−ルドの長さです。文字列は左詰めで出力されます。

.幅: 浮動小数点数の精度(小数点以下の桁数)、あるいは出力する文字列の最大文字数です。

書式文字には、以下のものがあります。

% %を出力する q writeq(項)と同様にPrologの項を出力する Q displayq(項)と同様にPrologの項を出力する t write(項)と同様にPrologの項を出力する T display(項)と同様にPrologの項を出力する lq lQ lt lT 項のリスト中の'term(T,VL,P)'という形の項が、write_term(T,VL)あるいはdisplay_term(T,VL)と同様に出力される。 この出力は、優先順位がPであるコンテクストで行われる。 s 「項」はアトムでなければならない f g e 「項」は数値でなければならない d o x 「項」は整数でなければならない c 「項」は整数でなければならない。 指定された文字コ−ドの文字が出力される。

?- print('result: %lq\n', [term((a(X), b), ['X' = X], 1200)]). result: a(X) , b X = _299 yes ?- print('result: %lq\n', [term((a(X), b), ['X' = X], 999)]). result: (a(X) ,b) X = _299 yes ?- print('*%8.5s*', [string]). * strin* yes ?- print('*%-8.5s*', [string]). *strin * yes

atom_expected 「ストリ−ム」はアトムでなければならない stream_not_open 「ストリ−ム」が開かれていない out_of_range 「ストリ−ム」は、出力用に開かれなければならない

read on...
IF/Prolog by Siemens
Sprache
English
Japanese
German
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/IFProlog/Manuals/v4.1/reference/print/home_de.html
published 2008/12/1 update 1995/11/7 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS