File: gettext.info, Node: modula2-format, Next: d-format, Prev: object-pascal-format, Up: Translators for other Languages 16.3.19 Modula-2 Format Strings ------------------------------- Modula-2 format strings are defined as follows: 1. Escape sequences are processed. These escape sequences are understood: ‘\a’, ‘\b’, ‘\e’, ‘\f’, ‘\n’, ‘\r’, ‘\xHEX-DIGITS’, ‘\OCTAL-DIGITS’. Other than that, a backslash is ignored. 2. A directive consists of • a ‘%’ character, • optionally a flag character ‘-’, • optionally a flag character ‘0’, • optionally a width specification (a nonnegative integer), • and finally a specifier: ‘s’ that formats a string, ‘c’ that formats a character, ‘d’ and ‘u’, that format a (signed/unsigned) integer in decimal, or ‘x’, that formats an unsigned integer in hexadecimal. There is also the directive ‘%%’, that produces a single percent character.
