The type character determines whether the argument is interpreted as a number, string, or character.
| Char. | Type | Output format |
|---|---|---|
| i, d | integer | Signed decimal integer. Example: int i=5; out "i=%i" i |
| u | integer | Unsigned decimal integer. |
| x | integer | Unsigned hexadecimal integer, using "abcdef." |
| X | integer | Unsigned hexadecimal integer, using "ABCDEF." |
| e | double | Signed value having the form [ - ]d.dddd e [sign]ddd where d is a single decimal digit, dddd is one or more decimal digits, ddd is exactly three decimal digits, and sign is + or -. |
| E | double | Identical to the e format except that E rather than e introduces the exponent. |
| f | double | Signed value having the form [ - ]dddd.dddd, where dddd is one or more decimal digits. The number of digits before the decimal point depends on the magnitude of the number, and the number of digits after the decimal point depends on the requested precision. |
| g | double | Signed value in f or e format, whichever is more compact for the given value and precision. The e format is used only when the exponent of the value is less than -4 or greater than or equal to the precision field. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it. |
| G | double | Identical to the g format, except that E, rather than e, introduces the exponent (where appropriate). |
| s | string | Characters are added up to the first null character or until the precision value is reached. |
| S | word* | QM 2.3.3. Unicode UTF-16 string. Example: BSTR b="utf-16 string"; out "%S" b.pstr |
| c | integer |
Note: In Unicode mode, don't use non ASCII characters. |
| C | integer | QM 2.3.3. Unicode UTF-16 character code. Must be <0x10000. |
| m | pointer | QM 2.3.3. Binary data. Length must be specified using precision. Example: _s.format("%.*m" 10 ptr) ;;10 bytes from ptr |
| m | byte | QM 2.3.3. Fill with an ASCII character. Length must be specified using precision. Example: out "%.*m" 4 '*' ;;****. For character code 0 use argument value 0x100. |
See also: format fields, precision