A negative width argument is equivalent to the - flag having appeared. The width and precision arguments must appear, in that order, before the argument that is being output. The optional precision specifies the number of digits that appear after the decimal point for floating-point formats, or the maximum field width for string formats.īoth width and precision can be specified as *, in which case the value is taken from the argument list. If the formatted value has fewer characters, it is padded on the left (or right, if - was specified) with blanks. The optional width indicates the minimum number of characters to output for this field. These are described in more detail in the help page rtable_printf. The braces enclose a set of detailed formatting options for printing an rtable. The output is padded on the left (between the sign and the first digit) with zeroes. The output is left justified instead of right justified.Ī signed numeric value is output with either a leading negative sign (-) or a leading blank, depending on whether the value is negative or non-negative. One or more of the following flags can optionally follow the % symbol.Ī signed numeric value is output with a leading positive or negative sign (+ or -), as appropriate. The % symbol begins the format specification. Each formatting specification has the following format. The format string, fmt, is a Maple symbol or string made up of a sequence of formatting specifications, possibly separated by other characters. Due to different character encodings, this number may differ from the number of bytes written to disk. The fprintf command returns a count of the number of characters written. The call printf(.) is equivalent to fprintf(default.). It uses the formatting specifications in the fmt string to format and display the expressions. The printf command is based on a C standard library command of the same name. The nprintf command is the same as sprintf, except that it returns a Maple symbol (a simple name) instead of a string. It uses the formatting specifications in the fmt string to format and write the expressions into a Maple string, which is returned. The sprintf command is based on a C standard library command of the same name. It uses the formatting specifications in the fmt string to format and write the expressions to the specified file. The fprintf command is based on a C standard library command of the same name.
Prints expressions to a default stream based on a format string Prints expressions to a name based on a format string Prints expressions to a string based on a format string Prints expressions to a file or pipe based on a format string