- Method _sprintf
This method is called by sprintf() to print objects. If it is not present, printing of the object will not be supported for any conversion-type except for the %O-conversion-type, which will output
Signed binary integer.
Signed decimal integer.
Unsigned decimal integer.
Signed octal integer.
Lowercase signed hexadecimal integer.
Uppercase signed hexadecimal integer.
Character. If a fieldsize has been specified this will output the low-order bytes of the integer in network byte order.
Heuristically chosen representation of float.
Like %g, but uses uppercase E for exponent.
Exponential notation float.
Like %e, but uses uppercase E for exponent.
Any value (debug style).
Type of the argument.
Conversion parameters. The following parameters may be supplied:
Indicates that the output should be left-aligned.
Indentation level in %O-mode.
Is expected to return a string describing the object formatted according to
_sprintf() is currently not called for the following conversion-types:
Binary IEEE representation of float (%4F gives single precision, %8F gives double precision.)
This function might be called at odd times, e.g. before lfun::create has been called or when an error has occurred. The reason is typically that it gets called when a backtrace is being formatted to report an error. It should therefore be very robust and not make any assumptions about its own internal state, at least not when
It's assumed that this function is side-effect free.
- See also