Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

Package fmt implements formatted I/O with functions analogous to C's printf and scanf. The format 'verbs' are derived from C's but are simpler. Printing ¶The verbs: General: %v the value in a default format when printing structs, the plus flag (%+v) adds field names %#v a Go-syntax representation of the value (floating-point infinities and NaNs print as ±Inf and NaN) %T a Go-syntax representation
elisp のデバッグ方法について以下の3つの方法を説明します. - printf デバッグ - backtrace - edebug ■■■ printf デバッグ elisp で printf デバッグを行なうには message 関数を使います.message 関数の結果は *Messages* バッファに出力されます. 例えば以下の<リスト1>のように使います. ---------------- <リスト1> message 関数を使った printf デバッグ (defun message-sample () (let (list) (dotimes (i 10) (push i list) (message "%s" list)))) ---------------- 実行中に目視したい場合は sit-for と message の組み合わせか y-or-n-p を使うのが良い
% 演算子。 >>> "<%.*s>" % (3, "hoge") '<hog>' >>> "<%*d>" % (6, 123) '< 123>' >>> "<%2$d %1$d>" % (123, 456) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: unsupported format character '$' (0x24) at index 3 >>> "<%s><%d><%f>" % ("hoge",123,3.14) '<hoge><123><3.140000>' >>> "<%s><%d><%f>" % (123,3.14,"hoge") Traceback (most recent call last): File "<stdin>", line 1,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く