message (マクロ)
パッケージ: CURL.LANGUAGE.COMPILER

シグネチャ

                {define-text-proc public {message
                                             out:#TextOutputStream = null,
                                             locale:#Locale = null,
                                             ...
                                         }:String
                }

テキストのメッセージを文字列に変換します。

説明

format の呼び出しに展開して、テキスト引数をフォーマット文字列に変換し、テキスト内の空白を縮小し、任意の内部プレフィックス表現を取り出して適切な "%s" フォーマット指定子を使用して format の引数にします。

注意事項

空白が縮小されるので、2 つの単語間に 2 つ以上の空白を入れないように注意してください。これは文と文の間でも同様です。

また、Curl ブラケット内の式は String に変換されるので、{bold ...} のような式は明らかに有効な意味を持たなくなることに注意してください。

たとえば、
{StringBuf
    {message
        There are many ways to initialize a StringBuf,
        but this way may be convenient when the initial
        contents are textual.  This is especially true
        when those contents are long.
    }
}
これは次のように展開されます。
{StringBuf
    "There are many ways to initialize a StringBuf, but this way may be convenient when the initial contents are textual. This is especially true when those contents are long."
}

以下の例があるとします。
{StringBuf
    {message
        The value of a variable can be included easily,
        such as {value int-max}, and so can the value of
        curly expressions, such as {format "%.2f", 22 / 7}.
    }
}
これは次のように展開されます。
{StringBuf
    {format
        "The value of a variable can be included easily, such as %s and so can the value of curly expressions, such as %s.",
        int-max, {format "%.2f", 22 / 7}
    }
}