Next: , Previous: Other Directives, Up: Format Directives


3.2.2.7 Reserved and Unknown Directives

The ‘%(’, ‘%{’ and ‘%[’ format directives, with or without field with and precision specifications, are reserved for future use. Don't use them and don't rely on current experiment to predict future behaviour. To print ‘(’, simply use ‘(’ rather than ‘%(’. Likewise for ‘{’ and ‘[’.

Similarly, a ‘%’ character followed by any other unrecognised character (i.e., not a known directive or printf field width and precision specifier), is discarded (but the unrecognised character is printed), and a warning message is printed to the standard error output (because it was probably a typo). Don't rely on this behaviour, because other directives may be added in the future.