Condition messages are constructed using format strings. A format string is a string template into which values can be inserted to construct a message. The two-character format directives
%= are replaced by the corresponding element of the associated sequence of format arguments. Upper and lower case letters are equivalent in these format directives. The inserted value is formatted according to the following table:
|Directive||Argument Type||Textual Format|
|character (with no quotes)|
|string (with no quotes)|
|condition message (with no quotes)|
|unspecified, but works with any object|
The text printed by the
%= format directive for any given object is implementation-defined. The behavior when a format argument is not of the type specified in the table above is implementation-defined. The behavior when too many or too few format arguments are supplied is implementation-defined.
The two-character sequence
%% does not consume a format argument, but inserts a
All other uses of the
% character in a format string are implementation-defined.
There is no standard way to get the message from a condition (although it can be inserted into another message). Debuggers get the message using implementation-dependent mechanisms. A streams library or other implementation-dependent feature might include a function to get the message from a condition. However, in some implementations, the message might only exist in the debugger, not in the program runtime.
There is no standard way for a user-defined condition class to supply a message. Individual implementations and libraries can specify such a mechanism that is appropriate to their needs.
printf, with some ommisions and with the addition of
Generated with Harlequin WebMaker