Syntax of the Format String

Applies to AQTime 8.81, last modified on March 03, 2021

AQTime lets you specify the format for column and summary values displayed in AQTime panels. You can do this in the Customize Call Graph dialog or in the Format and Summary pages of the Format Columns dialog.

The format includes the following elements (the elements in bold are obligatory, the brackets mark out optional elements):

[chars] % [width] [. prec] type [chars]

  • Chars is simply an optional fixed string to show at the beginning of the value. For instance, the default Token column format starts with "$". To specify the % symbol in this string, use %%.
  • Width is an optional positive integer, which defines the minimum width for the value. The value will be left-padded with blanks if it does not occupy at least this width.
  • Prec (precision), always prefixed with a period, is also an optional positive integer. The effect depends on the Type element.
  • Type is the essential element. It specifies the formatted value. Type is case-insensitive. There are two Types for integers, four Types for floats, and one Type for strings.
    • Types for integers:
      Type Description
      d decimal. The value is shown as a string of decimal digits, left-padded with 0 if the number of digits is less than Prec.
      x hexadecimal. Identical to d, except that hexadecimal digits are used.
    • Types for floats. The decimal and thousands separators are those from the current Windows settings:
       Type Description
      e scientific. Prec is the total number of digits to display, including the one before the decimal separator. Therefore, it sets the precision.
      f fixed. Fixed-decimal, Prec sets the number of digits after the decimal point, default 2.
      g general. Prec sets the total number of digits used, default 15. If the integer part of the value needs fewer digits than Prec, it is displayed as an ordinary decimal, using the number of decimals needed to fill out Prec. If it requires exactly Prec digits, then the value is displayed as an integer. If the integer part requires more digits than Prec, then the value is displayed in scientific notation. Scientific notation is also used if the value is smaller than 0.00001.
      n number. Displays the same way as f, but with thousands separators.
    • Type for strings:
      Type Description
      s string. Displays the string value. If Prec is not omitted it defines the length of the string displayed.

Following are some examples of string formatting:

Format Values
%0.2f %% 10.23%
$%8.8x $006004
Routine: "%s" executed. Routine: "Form1::button1_Click" executed.

See Also

Format Columns Dialog
Customize Call Graph Dialog
Report Panel

Highlight search results