Each of the format codes %wd (Display Integer), %wx (Write Hex), %wf (Display Real), %we (Display Real), %wg (Display Real), %ws (Display String), and %wc (Display Character), can be modified in order to control the way in which the information is presented in the dialog window. The modifiers are all optional and appear after the % sign with the following general form:
where code is one of wd, wf, etc.
[width] represents a positive integer that specifies the minimum number of characters that are to be output. More characters will be output rather than truncate the result. Where fewer than the minimum are needed, by default the field is padded with spaces on the left. Note, however, that with a proportionally spaced font, padding may have little apparent effect.
[.precision] represents a full stop followed by a positive integer that specifies the precision of the output. For floating point values, this integer is usually the required number of decimal places in the output.
Alternatively the [width] and [.precision] values may be replaced with an asterisk (*).
Integer values must then be supplied as arguments, one for each asterisk.
[flags] represents one or more of the characters: minus "-", zero "0", plus "+", and the hash symbol "#". These modifiers have various effects depending on the current format code. For example they are used to force left justification, to pad with zeros rather than spaces, and to force a plus sign for a non-negative result.
In the following examples Ñ is used to represent a space.