Format Strings

A format string consists of its format specification and the rest of characters that are put into the result unchanged.

There are two format string styles: C/C++/Java and C#. The acceptable style depends on the software product you have.

A C++ format specification always starts from the % sign. If it is necessary to use this character as a character instead of a formatting element, it should be doubled.

C# format string has following format: {n} or {n:format} where 'n' is position, 0 for most cases.

The most useful format types are:

C++/Java formatDescription
%dDSigned decimal integer. You can use width for this field, for example, %5d. If you specify the width as %05d, the engine will add non-significant zeros to reach the specified width.
%I64d Huge integer number. Currently, it can be used with $Inc and $RInt functions only.
%xXhexadecimal integer. Uses lowercase letters for hexadecimal integers. %X uses uppercase letters.
%fFvalue in the form dddd.dddd, where dddd is one or more decimal digits. It is possible to specify sizes in the form %5.2f (2 corresponds to the number of decimal digits here, while 5 is the total).
%s String. '-' (minus) means alignment to the right side if it is specified together with the width.