vprintf
Description:
Loads the data from the locations, defined by vlist, converts them to character string equivalents and writes the results to a variety of sinks.
Example: Write a formatted string to the stream (va_list):
public static void myprintf (string msg, ...) {
va_list va_list = va_list ();
stdout.vprintf ("Error: " + msg + "\n", va_list);
}
public static int main (string[] args) {
// Output: ``error: 10: My error message``
myprintf ("%d: My %s message", 10, "error");
return 0;
}
valac --pkg glib-2.0 GLib.FileStream.vprintf.vala
Parameters:
format |
a string specifying how to interpret the data. (See GLib.FileStream.printf ) |
args |
variable argument list containing the data to print. |