https://www.erlang.org/doc/apps/stdlib/io.html The general format for an io:format control sequence in Erlang is ~F.P.PadModC. The character C determines the type of specifier, while F, P, Pad, and Mod are optional modifiers for field width, precision, padding, and other settings. Here is a list of the available control sequences (specifiers): ~: Prints a literal ~ character. c: The argument (an integer ASCII code) is printed as a character. The precision determines the number of times it's printed. f: The argument (a float) is printed as [-]ddd.ddd. The precision determines the number of digits after the decimal point (default is 6). e: The argument (a float) is printed in scientific notation [-]d.ddde+-ddd. The precision is the number of digits after the decimal point (default is 6). g: The argument (a float) is printed using the shortest form of ~f or ~e. The precision determines the number of significant digits (default is 6). s: The argument (a string/character_list or atom) is printed without quotes. It can be truncated by precision. w: The argument is printed with the standard Erlang term syntax, similar to erlang:term_to_io_list/1. p: Similar to ~w, but formats the output over multiple lines with sensible indentation if the term is long, which is useful for complex data structures. W: Similar to ~w, but takes an extra integer argument from the data list that specifies the maximum depth to which terms are printed. P: Similar to ~p, but takes an extra integer argument for the maximum depth, enabling depth-limited pretty printing. B: The argument (an integer) is printed in a specified base (2-36, default is 10). The field width and precision can control padding and minimum digits. b: Similar to ~B, but uses lowercase letters for bases > 10. X: Similar to ~B, but takes an extra argument for a prefix to insert before the number (after a leading dash, if any). x: Similar to ~X, but uses lowercase letters. #: Similar to ~B, but prints the number with an Erlang-style base prefix (e.g., 16#ffff). +: Similar to ~#, but uses lowercase letters. n: Writes a newline character. Takes no arguments. i: Ignores the next argument in the data list. Useful for commenting out arguments in the format string.