Project

General

Profile

Up

printf

See sprintf. This function write the result in the log file.

Prototype :

fun [S u0 I] S

  • S : the formatted string. Currently, theses conversion specifiers are availables such as %d, %f, %x, %s, eventually with a precision (see sprintf for details).

  • u0 : a polymorphic tuple. Its size should be equal at the number of conversion specifiers. Otherwise, if the size is lesser, the last converters will be ignored. If the size is greater, the last items will be ignored. If an item is nil, the converter will be write again.
    Note : if it is not a tuple, the behavior is undefined.

  • I : the log mask (0, 1, 2, 4, 8 or 16)

Return : S a new string or nil if error

Error :

  • EOK if success.
  • EVM probably a memory error. The VM should be already crashed, see the log file, if any.
  • ERANGE if the size of the tuple and the number of converters is different.
  • EARG if the tuple could not be a tuple (this is not sure, it is just a strong probability).

See also :

sprintf

All functions _foo* in Core > Standard library section.